From 4559de0187436e3434e962f7a3552d2075a71f42 Mon Sep 17 00:00:00 2001 From: keven Date: Tue, 14 Oct 2025 08:05:21 -0300 Subject: [PATCH 01/11] [MVPTN-23] feat(CRUD): Adiciona CRUD para manipular o G_NATUREZA --- package-lock.json | 916 +++++++++++------- package.json | 5 +- .../administrativo/minutas/naturezas/page.tsx | 11 + src/components/app-sidebar.tsx | 4 + src/components/ui/switch.tsx | 31 + .../components/GNatureza/GNaturezaColumns.tsx | 123 +++ .../components/GNatureza/GNaturezaForm.tsx | 175 ++++ .../components/GNatureza/GNaturezaIndex.tsx | 177 ++++ .../components/GNatureza/GNaturezaTable.tsx | 26 + .../data/GNatureza/GNaturezaDeleteData.ts | 18 + .../data/GNatureza/GNaturezaIndexData.ts | 18 + .../data/GNatureza/GNaturezaSaveData.ts | 24 + .../hooks/GNatureza/useGNaturezaDeleteHook.ts | 19 + .../hooks/GNatureza/useGNaturezaFormHook.ts | 13 + .../hooks/GNatureza/useGNaturezaIndexHook.ts | 25 + .../hooks/GNatureza/useGNaturezaSaveHook.ts | 33 + .../GNatureza/GNaturezaFormInterface.ts | 9 + .../GNatureza/GNaturezaIndexInterface.ts | 3 + .../GNatureza/GNaturezaInterface.ts | 8 + .../GNatureza/GNaturezaTableInterface.ts | 7 + .../schemas/GNatureza/GNaturezaSchema.ts | 12 + .../GNatureza/GNaturezaDeleteService.ts | 11 + .../GNatureza/GNaturezaIndexService.ts | 11 + .../GNatureza/GNaturezaSaveService.ts | 11 + .../components/situacoes/SituacoesSelect.tsx | 62 ++ src/shared/enums/SituacoesEnum.ts | 4 +- 26 files changed, 1385 insertions(+), 371 deletions(-) create mode 100644 src/app/(protected)/(administrativo)/administrativo/minutas/naturezas/page.tsx create mode 100644 src/components/ui/switch.tsx create mode 100644 src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx create mode 100644 src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx create mode 100644 src/packages/administrativo/components/GNatureza/GNaturezaIndex.tsx create mode 100644 src/packages/administrativo/components/GNatureza/GNaturezaTable.tsx create mode 100644 src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts create mode 100644 src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts create mode 100644 src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts create mode 100644 src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts create mode 100644 src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts create mode 100644 src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts create mode 100644 src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts create mode 100644 src/packages/administrativo/interfaces/GNatureza/GNaturezaFormInterface.ts create mode 100644 src/packages/administrativo/interfaces/GNatureza/GNaturezaIndexInterface.ts create mode 100644 src/packages/administrativo/interfaces/GNatureza/GNaturezaInterface.ts create mode 100644 src/packages/administrativo/interfaces/GNatureza/GNaturezaTableInterface.ts create mode 100644 src/packages/administrativo/schemas/GNatureza/GNaturezaSchema.ts create mode 100644 src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts create mode 100644 src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts create mode 100644 src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts create mode 100644 src/shared/components/situacoes/SituacoesSelect.tsx diff --git a/package-lock.json b/package-lock.json index 2d46362..be7b85e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.2.6", "@radix-ui/react-tabs": "^1.1.13", "@radix-ui/react-tooltip": "^1.2.8", "@tanstack/react-table": "^8.21.3", @@ -66,7 +67,7 @@ "prettier-plugin-tailwindcss": "^0.6.14", "tailwindcss": "^4", "tw-animate-css": "^1.3.7", - "typescript": "^5" + "typescript": "5.9.3" } }, "node_modules/@alloc/quick-lru": { @@ -134,19 +135,6 @@ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/@eslint-community/regexpp": { "version": "4.12.1", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", @@ -181,6 +169,40 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/js": { "version": "8.57.1", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", @@ -273,6 +295,30 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -800,25 +846,55 @@ } }, "node_modules/@next/env": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.4.tgz", - "integrity": "sha512-27SQhYp5QryzIT5uO8hq99C69eLQ7qkzkDPsk3N+GuS2XgOgoYEeOav7Pf8Tn4drECOVDsDg8oj+/DVy8qQL2A==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.5.tgz", + "integrity": "sha512-2Zhvss36s/yL+YSxD5ZL5dz5pI6ki1OLxYlh6O77VJ68sBnlUrl5YqhBgCy7FkdMsp9RBeGFwpuDCdpJOqdKeQ==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.5.4.tgz", - "integrity": "sha512-SR1vhXNNg16T4zffhJ4TS7Xn7eq4NfKfcOsRwea7RIAHrjRpI9ALYbamqIJqkAhowLlERffiwk0FMvTLNdnVtw==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.5.5.tgz", + "integrity": "sha512-FMzm412l9oFB8zdRD+K6HQ1VzlS+sNNsdg0MfvTg0i8lfCyTgP/RFxiu/pGJqZ/IQnzn9xSiLkjOVI7Iv4nbdQ==", "dev": true, "license": "MIT", "dependencies": { "fast-glob": "3.3.1" } }, + "node_modules/@next/eslint-plugin-next/node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/@next/eslint-plugin-next/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.4.tgz", - "integrity": "sha512-nopqz+Ov6uvorej8ndRX6HlxCYWCO3AHLfKK2TYvxoSB2scETOcfm/HSS3piPqc3A+MUgyHoqE6je4wnkjfrOA==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.5.tgz", + "integrity": "sha512-lYExGHuFIHeOxf40mRLWoA84iY2sLELB23BV5FIDHhdJkN1LpRTPc1MDOawgTo5ifbM5dvAwnGuHyNm60G1+jw==", "cpu": [ "arm64" ], @@ -832,9 +908,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.4.tgz", - "integrity": "sha512-QOTCFq8b09ghfjRJKfb68kU9k2K+2wsC4A67psOiMn849K9ZXgCSRQr0oVHfmKnoqCbEmQWG1f2h1T2vtJJ9mA==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.5.tgz", + "integrity": "sha512-cacs/WQqa96IhqUm+7CY+z/0j9sW6X80KE07v3IAJuv+z0UNvJtKSlT/T1w1SpaQRa9l0wCYYZlRZUhUOvEVmg==", "cpu": [ "x64" ], @@ -848,9 +924,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.4.tgz", - "integrity": "sha512-eRD5zkts6jS3VfE/J0Kt1VxdFqTnMc3QgO5lFE5GKN3KDI/uUpSyK3CjQHmfEkYR4wCOl0R0XrsjpxfWEA++XA==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.5.tgz", + "integrity": "sha512-tLd90SvkRFik6LSfuYjcJEmwqcNEnVYVOyKTacSazya/SLlSwy/VYKsDE4GIzOBd+h3gW+FXqShc2XBavccHCg==", "cpu": [ "arm64" ], @@ -864,9 +940,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.4.tgz", - "integrity": "sha512-TOK7iTxmXFc45UrtKqWdZ1shfxuL4tnVAOuuJK4S88rX3oyVV4ZkLjtMT85wQkfBrOOvU55aLty+MV8xmcJR8A==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.5.tgz", + "integrity": "sha512-ekV76G2R/l3nkvylkfy9jBSYHeB4QcJ7LdDseT6INnn1p51bmDS1eGoSoq+RxfQ7B1wt+Qa0pIl5aqcx0GLpbw==", "cpu": [ "arm64" ], @@ -880,9 +956,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.4.tgz", - "integrity": "sha512-7HKolaj+481FSW/5lL0BcTkA4Ueam9SPYWyN/ib/WGAFZf0DGAN8frNpNZYFHtM4ZstrHZS3LY3vrwlIQfsiMA==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.5.tgz", + "integrity": "sha512-tI+sBu+3FmWtqlqD4xKJcj3KJtqbniLombKTE7/UWyyoHmOyAo3aZ7QcEHIOgInXOG1nt0rwh0KGmNbvSB0Djg==", "cpu": [ "x64" ], @@ -896,9 +972,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.4.tgz", - "integrity": "sha512-nlQQ6nfgN0nCO/KuyEUwwOdwQIGjOs4WNMjEUtpIQJPR2NUfmGpW2wkJln1d4nJ7oUzd1g4GivH5GoEPBgfsdw==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.5.tgz", + "integrity": "sha512-kDRh+epN/ulroNJLr+toDjN+/JClY5L+OAWjOrrKCI0qcKvTw9GBx7CU/rdA2bgi4WpZN3l0rf/3+b8rduEwrQ==", "cpu": [ "x64" ], @@ -912,9 +988,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.4.tgz", - "integrity": "sha512-PcR2bN7FlM32XM6eumklmyWLLbu2vs+D7nJX8OAIoWy69Kef8mfiN4e8TUv2KohprwifdpFKPzIP1njuCjD0YA==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.5.tgz", + "integrity": "sha512-GDgdNPFFqiKjTrmfw01sMMRWhVN5wOCmFzPloxa7ksDfX6TZt62tAK986f0ZYqWpvDFqeBCLAzmgTURvtQBdgw==", "cpu": [ "arm64" ], @@ -928,9 +1004,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.4.tgz", - "integrity": "sha512-1ur2tSHZj8Px/KMAthmuI9FMp/YFusMMGoRNJaRZMOlSkgvLjzosSdQI0cJAKogdHl3qXUQKL9MGaYvKwA7DXg==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.5.tgz", + "integrity": "sha512-5kE3oRJxc7M8RmcTANP8RGoJkaYlwIiDD92gSwCjJY0+j8w8Sl1lvxgQ3bxfHY2KkHFai9tpy/Qx1saWV8eaJQ==", "cpu": [ "x64" ], @@ -1693,6 +1769,35 @@ } } }, + "node_modules/@radix-ui/react-switch": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.2.6.tgz", + "integrity": "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-use-size": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-tabs": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.13.tgz", @@ -1948,9 +2053,9 @@ "license": "MIT" }, "node_modules/@rushstack/eslint-patch": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.12.0.tgz", - "integrity": "sha512-5EwMtOqvJMMa3HbmxLlF74e+3/HhwBTMcvt3nqVJgGCozO6hzIPOBlwm8mGVNR9SN2IJpxSnlxczyDjcn7qIyw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.14.0.tgz", + "integrity": "sha512-WJFej426qe4RWOm9MMtP4V3CV4AucXolQty+GRgAWLgQXmpCuwzs7hEpxxhSc/znXUSxum9d/P/32MW0FlAAlA==", "dev": true, "license": "MIT" }, @@ -1970,54 +2075,54 @@ } }, "node_modules/@tailwindcss/node": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.13.tgz", - "integrity": "sha512-eq3ouolC1oEFOAvOMOBAmfCIqZBJuvWvvYWh5h5iOYfe1HFC6+GZ6EIL0JdM3/niGRJmnrOc+8gl9/HGUaaptw==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.14.tgz", + "integrity": "sha512-hpz+8vFk3Ic2xssIA3e01R6jkmsAhvkQdXlEbRTk6S10xDAtiQiM3FyvZVGsucefq764euO/b8WUW9ysLdThHw==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/remapping": "^2.3.4", "enhanced-resolve": "^5.18.3", - "jiti": "^2.5.1", + "jiti": "^2.6.0", "lightningcss": "1.30.1", - "magic-string": "^0.30.18", + "magic-string": "^0.30.19", "source-map-js": "^1.2.1", - "tailwindcss": "4.1.13" + "tailwindcss": "4.1.14" } }, "node_modules/@tailwindcss/oxide": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.13.tgz", - "integrity": "sha512-CPgsM1IpGRa880sMbYmG1s4xhAy3xEt1QULgTJGQmZUeNgXFR7s1YxYygmJyBGtou4SyEosGAGEeYqY7R53bIA==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.14.tgz", + "integrity": "sha512-23yx+VUbBwCg2x5XWdB8+1lkPajzLmALEfMb51zZUBYaYVPDQvBSD/WYDqiVyBIo2BZFa3yw1Rpy3G2Jp+K0dw==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { "detect-libc": "^2.0.4", - "tar": "^7.4.3" + "tar": "^7.5.1" }, "engines": { "node": ">= 10" }, "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.1.13", - "@tailwindcss/oxide-darwin-arm64": "4.1.13", - "@tailwindcss/oxide-darwin-x64": "4.1.13", - "@tailwindcss/oxide-freebsd-x64": "4.1.13", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.13", - "@tailwindcss/oxide-linux-arm64-gnu": "4.1.13", - "@tailwindcss/oxide-linux-arm64-musl": "4.1.13", - "@tailwindcss/oxide-linux-x64-gnu": "4.1.13", - "@tailwindcss/oxide-linux-x64-musl": "4.1.13", - "@tailwindcss/oxide-wasm32-wasi": "4.1.13", - "@tailwindcss/oxide-win32-arm64-msvc": "4.1.13", - "@tailwindcss/oxide-win32-x64-msvc": "4.1.13" + "@tailwindcss/oxide-android-arm64": "4.1.14", + "@tailwindcss/oxide-darwin-arm64": "4.1.14", + "@tailwindcss/oxide-darwin-x64": "4.1.14", + "@tailwindcss/oxide-freebsd-x64": "4.1.14", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.14", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.14", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.14", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.14", + "@tailwindcss/oxide-linux-x64-musl": "4.1.14", + "@tailwindcss/oxide-wasm32-wasi": "4.1.14", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.14", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.14" } }, "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.13.tgz", - "integrity": "sha512-BrpTrVYyejbgGo57yc8ieE+D6VT9GOgnNdmh5Sac6+t0m+v+sKQevpFVpwX3pBrM2qKrQwJ0c5eDbtjouY/+ew==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.14.tgz", + "integrity": "sha512-a94ifZrGwMvbdeAxWoSuGcIl6/DOP5cdxagid7xJv6bwFp3oebp7y2ImYsnZBMTwjn5Ev5xESvS3FFYUGgPODQ==", "cpu": [ "arm64" ], @@ -2032,9 +2137,9 @@ } }, "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.13.tgz", - "integrity": "sha512-YP+Jksc4U0KHcu76UhRDHq9bx4qtBftp9ShK/7UGfq0wpaP96YVnnjFnj3ZFrUAjc5iECzODl/Ts0AN7ZPOANQ==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.14.tgz", + "integrity": "sha512-HkFP/CqfSh09xCnrPJA7jud7hij5ahKyWomrC3oiO2U9i0UjP17o9pJbxUN0IJ471GTQQmzwhp0DEcpbp4MZTA==", "cpu": [ "arm64" ], @@ -2049,9 +2154,9 @@ } }, "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.13.tgz", - "integrity": "sha512-aAJ3bbwrn/PQHDxCto9sxwQfT30PzyYJFG0u/BWZGeVXi5Hx6uuUOQEI2Fa43qvmUjTRQNZnGqe9t0Zntexeuw==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.14.tgz", + "integrity": "sha512-eVNaWmCgdLf5iv6Qd3s7JI5SEFBFRtfm6W0mphJYXgvnDEAZ5sZzqmI06bK6xo0IErDHdTA5/t7d4eTfWbWOFw==", "cpu": [ "x64" ], @@ -2066,9 +2171,9 @@ } }, "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.13.tgz", - "integrity": "sha512-Wt8KvASHwSXhKE/dJLCCWcTSVmBj3xhVhp/aF3RpAhGeZ3sVo7+NTfgiN8Vey/Fi8prRClDs6/f0KXPDTZE6nQ==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.14.tgz", + "integrity": "sha512-QWLoRXNikEuqtNb0dhQN6wsSVVjX6dmUFzuuiL09ZeXju25dsei2uIPl71y2Ic6QbNBsB4scwBoFnlBfabHkEw==", "cpu": [ "x64" ], @@ -2083,9 +2188,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.13.tgz", - "integrity": "sha512-mbVbcAsW3Gkm2MGwA93eLtWrwajz91aXZCNSkGTx/R5eb6KpKD5q8Ueckkh9YNboU8RH7jiv+ol/I7ZyQ9H7Bw==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.14.tgz", + "integrity": "sha512-VB4gjQni9+F0VCASU+L8zSIyjrLLsy03sjcR3bM0V2g4SNamo0FakZFKyUQ96ZVwGK4CaJsc9zd/obQy74o0Fw==", "cpu": [ "arm" ], @@ -2100,9 +2205,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.13.tgz", - "integrity": "sha512-wdtfkmpXiwej/yoAkrCP2DNzRXCALq9NVLgLELgLim1QpSfhQM5+ZxQQF8fkOiEpuNoKLp4nKZ6RC4kmeFH0HQ==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.14.tgz", + "integrity": "sha512-qaEy0dIZ6d9vyLnmeg24yzA8XuEAD9WjpM5nIM1sUgQ/Zv7cVkharPDQcmm/t/TvXoKo/0knI3me3AGfdx6w1w==", "cpu": [ "arm64" ], @@ -2117,9 +2222,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.13.tgz", - "integrity": "sha512-hZQrmtLdhyqzXHB7mkXfq0IYbxegaqTmfa1p9MBj72WPoDD3oNOh1Lnxf6xZLY9C3OV6qiCYkO1i/LrzEdW2mg==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.14.tgz", + "integrity": "sha512-ISZjT44s59O8xKsPEIesiIydMG/sCXoMBCqsphDm/WcbnuWLxxb+GcvSIIA5NjUw6F8Tex7s5/LM2yDy8RqYBQ==", "cpu": [ "arm64" ], @@ -2134,9 +2239,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.13.tgz", - "integrity": "sha512-uaZTYWxSXyMWDJZNY1Ul7XkJTCBRFZ5Fo6wtjrgBKzZLoJNrG+WderJwAjPzuNZOnmdrVg260DKwXCFtJ/hWRQ==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.14.tgz", + "integrity": "sha512-02c6JhLPJj10L2caH4U0zF8Hji4dOeahmuMl23stk0MU1wfd1OraE7rOloidSF8W5JTHkFdVo/O7uRUJJnUAJg==", "cpu": [ "x64" ], @@ -2151,9 +2256,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.13.tgz", - "integrity": "sha512-oXiPj5mi4Hdn50v5RdnuuIms0PVPI/EG4fxAfFiIKQh5TgQgX7oSuDWntHW7WNIi/yVLAiS+CRGW4RkoGSSgVQ==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.14.tgz", + "integrity": "sha512-TNGeLiN1XS66kQhxHG/7wMeQDOoL0S33x9BgmydbrWAb9Qw0KYdd8o1ifx4HOGDWhVmJ+Ul+JQ7lyknQFilO3Q==", "cpu": [ "x64" ], @@ -2168,9 +2273,9 @@ } }, "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.13.tgz", - "integrity": "sha512-+LC2nNtPovtrDwBc/nqnIKYh/W2+R69FA0hgoeOn64BdCX522u19ryLh3Vf3F8W49XBcMIxSe665kwy21FkhvA==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.14.tgz", + "integrity": "sha512-uZYAsaW/jS/IYkd6EWPJKW/NlPNSkWkBlaeVBi/WsFQNP05/bzkebUL8FH1pdsqx4f2fH/bWFcUABOM9nfiJkQ==", "bundleDependencies": [ "@napi-rs/wasm-runtime", "@emnapi/core", @@ -2186,21 +2291,21 @@ "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "^1.4.5", - "@emnapi/runtime": "^1.4.5", - "@emnapi/wasi-threads": "^1.0.4", - "@napi-rs/wasm-runtime": "^0.2.12", - "@tybys/wasm-util": "^0.10.0", - "tslib": "^2.8.0" + "@emnapi/core": "^1.5.0", + "@emnapi/runtime": "^1.5.0", + "@emnapi/wasi-threads": "^1.1.0", + "@napi-rs/wasm-runtime": "^1.0.5", + "@tybys/wasm-util": "^0.10.1", + "tslib": "^2.4.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.13.tgz", - "integrity": "sha512-dziTNeQXtoQ2KBXmrjCxsuPk3F3CQ/yb7ZNZNA+UkNTeiTGgfeh+gH5Pi7mRncVgcPD2xgHvkFCh/MhZWSgyQg==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.14.tgz", + "integrity": "sha512-Az0RnnkcvRqsuoLH2Z4n3JfAef0wElgzHD5Aky/e+0tBUxUhIeIqFBTMNQvmMRSP15fWwmvjBxZ3Q8RhsDnxAA==", "cpu": [ "arm64" ], @@ -2215,9 +2320,9 @@ } }, "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.13.tgz", - "integrity": "sha512-3+LKesjXydTkHk5zXX01b5KMzLV1xl2mcktBJkje7rhFUpUlYJy7IMOLqjIRQncLTa1WZZiFY/foAeB5nmaiTw==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.14.tgz", + "integrity": "sha512-ttblVGHgf68kEE4om1n/n44I0yGPkCPbLsqzjvybhpwa6mKKtgFfAzy6btc3HRmuW7nHe0OOrSeNP9sQmmH9XA==", "cpu": [ "x64" ], @@ -2232,17 +2337,17 @@ } }, "node_modules/@tailwindcss/postcss": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.13.tgz", - "integrity": "sha512-HLgx6YSFKJT7rJqh9oJs/TkBFhxuMOfUKSBEPYwV+t78POOBsdQ7crhZLzwcH3T0UyUuOzU/GK5pk5eKr3wCiQ==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.14.tgz", + "integrity": "sha512-BdMjIxy7HUNThK87C7BC8I1rE8BVUsfNQSI5siQ4JK3iIa3w0XyVvVL9SXLWO//CtYTcp1v7zci0fYwJOjB+Zg==", "dev": true, "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", - "@tailwindcss/node": "4.1.13", - "@tailwindcss/oxide": "4.1.13", + "@tailwindcss/node": "4.1.14", + "@tailwindcss/oxide": "4.1.14", "postcss": "^8.4.41", - "tailwindcss": "4.1.13" + "tailwindcss": "4.1.14" } }, "node_modules/@tanstack/react-table": { @@ -2341,9 +2446,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.19.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.17.tgz", - "integrity": "sha512-gfehUI8N1z92kygssiuWvLiwcbOB3IRktR6hTDgJlXMYh5OvkPSRmgfoBUmfZt+vhwJtX7v1Yw4KvvAf7c5QKQ==", + "version": "20.19.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.21.tgz", + "integrity": "sha512-CsGG2P3I5y48RPMfprQGfy4JPRZ6csfC3ltBZSRItG3ngggmNY/qs2uZKp4p9VbrpqNNSMzUZNFZKzgOGnd/VA==", "dev": true, "license": "MIT", "dependencies": { @@ -2351,9 +2456,9 @@ } }, "node_modules/@types/react": { - "version": "19.1.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.14.tgz", - "integrity": "sha512-ukd93VGzaNPMAUPy0gRDSC57UuQbnH9Kussp7HBjM06YFi9uZTFhOvMSO2OKqXm1rSgzOE+pVx1k1PYHGwlc8Q==", + "version": "19.2.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", + "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", "devOptional": true, "license": "MIT", "dependencies": { @@ -2361,27 +2466,27 @@ } }, "node_modules/@types/react-dom": { - "version": "19.1.9", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.9.tgz", - "integrity": "sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ==", + "version": "19.2.2", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.2.tgz", + "integrity": "sha512-9KQPoO6mZCi7jcIStSnlOWn2nEF3mNmyr3rIAsGnAbQKYbRLyqmeSc39EVgtxXVia+LMT8j3knZLAZAh+xLmrw==", "devOptional": true, "license": "MIT", "peerDependencies": { - "@types/react": "^19.0.0" + "@types/react": "^19.2.0" } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.45.0.tgz", - "integrity": "sha512-HC3y9CVuevvWCl/oyZuI47dOeDF9ztdMEfMH8/DW/Mhwa9cCLnK1oD7JoTVGW/u7kFzNZUKUoyJEqkaJh5y3Wg==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.1.tgz", + "integrity": "sha512-rUsLh8PXmBjdiPY+Emjz9NX2yHvhS11v0SR6xNJkm5GM1MO9ea/1GoDKlHHZGrOJclL/cZ2i/vRUYVtjRhrHVQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.45.0", - "@typescript-eslint/type-utils": "8.45.0", - "@typescript-eslint/utils": "8.45.0", - "@typescript-eslint/visitor-keys": "8.45.0", + "@typescript-eslint/scope-manager": "8.46.1", + "@typescript-eslint/type-utils": "8.46.1", + "@typescript-eslint/utils": "8.46.1", + "@typescript-eslint/visitor-keys": "8.46.1", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -2395,32 +2500,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.45.0", + "@typescript-eslint/parser": "^8.46.1", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.45.0.tgz", - "integrity": "sha512-TGf22kon8KW+DeKaUmOibKWktRY8b2NSAZNdtWh798COm1NWx8+xJ6iFBtk3IvLdv6+LGLJLRlyhrhEDZWargQ==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.1.tgz", + "integrity": "sha512-6JSSaBZmsKvEkbRUkf7Zj7dru/8ZCrJxAqArcLaVMee5907JdtEbKGsZ7zNiIm/UAkpGUkaSMZEXShnN2D1HZA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.45.0", - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/typescript-estree": "8.45.0", - "@typescript-eslint/visitor-keys": "8.45.0", + "@typescript-eslint/scope-manager": "8.46.1", + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/typescript-estree": "8.46.1", + "@typescript-eslint/visitor-keys": "8.46.1", "debug": "^4.3.4" }, "engines": { @@ -2436,14 +2531,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.45.0.tgz", - "integrity": "sha512-3pcVHwMG/iA8afdGLMuTibGR7pDsn9RjDev6CCB+naRsSYs2pns5QbinF4Xqw6YC/Sj3lMrm/Im0eMfaa61WUg==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.1.tgz", + "integrity": "sha512-FOIaFVMHzRskXr5J4Jp8lFVV0gz5ngv3RHmn+E4HYxSJ3DgDzU7fVI1/M7Ijh1zf6S7HIoaIOtln1H5y8V+9Zg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.45.0", - "@typescript-eslint/types": "^8.45.0", + "@typescript-eslint/tsconfig-utils": "^8.46.1", + "@typescript-eslint/types": "^8.46.1", "debug": "^4.3.4" }, "engines": { @@ -2458,14 +2553,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.45.0.tgz", - "integrity": "sha512-clmm8XSNj/1dGvJeO6VGH7EUSeA0FMs+5au/u3lrA3KfG8iJ4u8ym9/j2tTEoacAffdW1TVUzXO30W1JTJS7dA==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.1.tgz", + "integrity": "sha512-weL9Gg3/5F0pVQKiF8eOXFZp8emqWzZsOJuWRUNtHT+UNV2xSJegmpCNQHy37aEQIbToTq7RHKhWvOsmbM680A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/visitor-keys": "8.45.0" + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/visitor-keys": "8.46.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2476,9 +2571,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.45.0.tgz", - "integrity": "sha512-aFdr+c37sc+jqNMGhH+ajxPXwjv9UtFZk79k8pLoJ6p4y0snmYpPA52GuWHgt2ZF4gRRW6odsEj41uZLojDt5w==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.1.tgz", + "integrity": "sha512-X88+J/CwFvlJB+mK09VFqx5FE4H5cXD+H/Bdza2aEWkSb8hnWIQorNcscRl4IEo1Cz9VI/+/r/jnGWkbWPx54g==", "dev": true, "license": "MIT", "engines": { @@ -2493,15 +2588,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.45.0.tgz", - "integrity": "sha512-bpjepLlHceKgyMEPglAeULX1vixJDgaKocp0RVJ5u4wLJIMNuKtUXIczpJCPcn2waII0yuvks/5m5/h3ZQKs0A==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.1.tgz", + "integrity": "sha512-+BlmiHIiqufBxkVnOtFwjah/vrkF4MtKKvpXrKSPLCkCtAp8H01/VV43sfqA98Od7nJpDcFnkwgyfQbOG0AMvw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/typescript-estree": "8.45.0", - "@typescript-eslint/utils": "8.45.0", + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/typescript-estree": "8.46.1", + "@typescript-eslint/utils": "8.46.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -2518,9 +2613,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.45.0.tgz", - "integrity": "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.1.tgz", + "integrity": "sha512-C+soprGBHwWBdkDpbaRC4paGBrkIXxVlNohadL5o0kfhsXqOC6GYH2S/Obmig+I0HTDl8wMaRySwrfrXVP8/pQ==", "dev": true, "license": "MIT", "engines": { @@ -2532,16 +2627,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.45.0.tgz", - "integrity": "sha512-GfE1NfVbLam6XQ0LcERKwdTTPlLvHvXXhOeUGC1OXi4eQBoyy1iVsW+uzJ/J9jtCz6/7GCQ9MtrQ0fml/jWCnA==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.1.tgz", + "integrity": "sha512-uIifjT4s8cQKFQ8ZBXXyoUODtRoAd7F7+G8MKmtzj17+1UbdzFl52AzRyZRyKqPHhgzvXunnSckVu36flGy8cg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.45.0", - "@typescript-eslint/tsconfig-utils": "8.45.0", - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/visitor-keys": "8.45.0", + "@typescript-eslint/project-service": "8.46.1", + "@typescript-eslint/tsconfig-utils": "8.46.1", + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/visitor-keys": "8.46.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2560,73 +2655,17 @@ "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/utils": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.45.0.tgz", - "integrity": "sha512-bxi1ht+tLYg4+XV2knz/F7RVhU0k6VrSMc9sb8DQ6fyCTrGQLHfo7lDtN0QJjZjKkLA2ThrKuCdHEvLReqtIGg==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.1.tgz", + "integrity": "sha512-vkYUy6LdZS7q1v/Gxb2Zs7zziuXN0wxqsetJdeZdRe/f5dwJFglmuvZBfTUivCtjH725C1jWCDfpadadD95EDQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.45.0", - "@typescript-eslint/types": "8.45.0", - "@typescript-eslint/typescript-estree": "8.45.0" + "@typescript-eslint/scope-manager": "8.46.1", + "@typescript-eslint/types": "8.46.1", + "@typescript-eslint/typescript-estree": "8.46.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2641,13 +2680,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.45.0.tgz", - "integrity": "sha512-qsaFBA3e09MIDAGFUrTk+dzqtfv1XPVz8t8d1f0ybTzrCY7BKiMC5cjrl1O/P7UmHsNyW90EYSkU/ZWpmXelag==", + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.1.tgz", + "integrity": "sha512-ptkmIf2iDkNUjdeu2bQqhFPV1m6qTnFFjg7PPDjxKWaMaP0Z6I9l30Jr3g5QqbZGdw8YdYvLp+XnqnWWZOg/NA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.45.0", + "@typescript-eslint/types": "8.46.1", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -2658,6 +2697,19 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", @@ -3223,9 +3275,9 @@ } }, "node_modules/axe-core": { - "version": "4.10.3", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz", - "integrity": "sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.0.tgz", + "integrity": "sha512-ilYanEU8vxxBexpJd8cWM4ElSQq4QctCLKih0TSfjIfCQTeyH/6zVrmIJfLPrKTKJRbiG+cfnZbQIjAlJmF1jQ==", "dev": true, "license": "MPL-2.0", "engines": { @@ -3250,14 +3302,13 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { @@ -3340,9 +3391,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001745", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001745.tgz", - "integrity": "sha512-ywt6i8FzvdgrrrGbr1jZVObnVv6adj+0if2/omv9cmR2oiZs30zL4DIyaptKcbOrBdOIc74QTMoJvSE2QHh5UQ==", + "version": "1.0.30001750", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001750.tgz", + "integrity": "sha512-cuom0g5sdX6rw00qOoLNSFCJ9/mYIsuSOA+yzpDw8eopiFqcVwQvZHqov0vmEighRxX++cfC0Vg1G+1Iy/mSpQ==", "funding": [ { "type": "opencollective", @@ -3623,9 +3674,9 @@ } }, "node_modules/detect-libc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.1.tgz", - "integrity": "sha512-ecqj/sy1jcK1uWrwpR67UhYrIFQ+5WlGxth34WquCbamhFA6hkkwiu37o6J5xCHdo1oixJRfVRw+ywV+Hq/0Aw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "devOptional": true, "license": "Apache-2.0", "engines": { @@ -3639,16 +3690,16 @@ "license": "MIT" }, "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, "node_modules/dunder-proto": { @@ -3944,13 +3995,13 @@ } }, "node_modules/eslint-config-next": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.5.4.tgz", - "integrity": "sha512-BzgVVuT3kfJes8i2GHenC1SRJ+W3BTML11lAOYFOOPzrk2xp66jBOAGEFRw+3LkYCln5UzvFsLhojrshb5Zfaw==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.5.5.tgz", + "integrity": "sha512-f8lRSSelp6cqrYjxEMjJ5En3WV913gTu/w9goYShnIujwDSQlKt4x9MwSDiduE9R5mmFETK44+qlQDxeSA0rUA==", "dev": true, "license": "MIT", "dependencies": { - "@next/eslint-plugin-next": "15.5.4", + "@next/eslint-plugin-next": "15.5.5", "@rushstack/eslint-patch": "^1.10.3", "@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", @@ -4106,6 +4157,17 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" } }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint-plugin-import/node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -4116,6 +4178,32 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint-plugin-import/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -4156,6 +4244,30 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" } }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint-plugin-prettier": { "version": "5.5.4", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", @@ -4233,6 +4345,43 @@ "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" } }, + "node_modules/eslint-plugin-react/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint-plugin-react/node_modules/resolve": { "version": "2.0.0-next.5", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", @@ -4295,32 +4444,6 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", @@ -4333,6 +4456,40 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -4351,19 +4508,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", @@ -4431,9 +4575,9 @@ "license": "Apache-2.0" }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { @@ -4441,7 +4585,7 @@ "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -4613,6 +4757,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -4680,9 +4834,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", - "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.12.0.tgz", + "integrity": "sha512-LScr2aNr2FbjAjZh2C6X6BxRx1/x+aTDExct/xyq2XKbYOiG5c0aK7pMsSuyc0brz3ibr/lbQiHD9jzt4lccJw==", "dev": true, "license": "MIT", "dependencies": { @@ -4727,6 +4881,30 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -4882,9 +5060,9 @@ } }, "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -5134,14 +5312,15 @@ } }, "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" }, @@ -5406,9 +5585,9 @@ } }, "node_modules/jiti": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.0.tgz", - "integrity": "sha512-VXe6RjJkBPj0ohtqaO8vSWP3ZhAKo66fKrFNCll4BTcwljPLz03pCbaNKfzGP5MbrCYcbJ7v0nOYYwUzTEIdXQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "dev": true, "license": "MIT", "bin": { @@ -5959,16 +6138,19 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { @@ -6029,9 +6211,9 @@ } }, "node_modules/napi-postinstall": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.3.tgz", - "integrity": "sha512-uTp172LLXSxuSYHv/kou+f6KW3SMppU9ivthaVTXian9sOt3XM/zHYHpRZiLgQoxeWfYUnslNWQHF1+G71xcow==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", + "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", "dev": true, "license": "MIT", "bin": { @@ -6052,12 +6234,12 @@ "license": "MIT" }, "node_modules/next": { - "version": "15.5.4", - "resolved": "https://registry.npmjs.org/next/-/next-15.5.4.tgz", - "integrity": "sha512-xH4Yjhb82sFYQfY3vbkJfgSDgXvBB6a8xPs9i35k6oZJRoQRihZH+4s9Yo2qsWpzBmZ3lPXaJ2KPXLfkvW4LnA==", + "version": "15.5.5", + "resolved": "https://registry.npmjs.org/next/-/next-15.5.5.tgz", + "integrity": "sha512-OQVdBPtpBfq7HxFN0kOVb7rXXOSIkt5lTzDJDGRBcOyVvNRIWFauMqi1gIHd1pszq1542vMOGY0HP4CaiALfkA==", "license": "MIT", "dependencies": { - "@next/env": "15.5.4", + "@next/env": "15.5.5", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", @@ -6070,14 +6252,14 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.5.4", - "@next/swc-darwin-x64": "15.5.4", - "@next/swc-linux-arm64-gnu": "15.5.4", - "@next/swc-linux-arm64-musl": "15.5.4", - "@next/swc-linux-x64-gnu": "15.5.4", - "@next/swc-linux-x64-musl": "15.5.4", - "@next/swc-win32-arm64-msvc": "15.5.4", - "@next/swc-win32-x64-msvc": "15.5.4", + "@next/swc-darwin-arm64": "15.5.5", + "@next/swc-darwin-x64": "15.5.5", + "@next/swc-linux-arm64-gnu": "15.5.5", + "@next/swc-linux-arm64-musl": "15.5.5", + "@next/swc-linux-x64-gnu": "15.5.5", + "@next/swc-linux-x64-musl": "15.5.5", + "@next/swc-win32-arm64-msvc": "15.5.5", + "@next/swc-win32-x64-msvc": "15.5.5", "sharp": "^0.34.3" }, "peerDependencies": { @@ -6639,9 +6821,9 @@ } }, "node_modules/react-hook-form": { - "version": "7.63.0", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.63.0.tgz", - "integrity": "sha512-ZwueDMvUeucovM2VjkCf7zIHcs1aAlDimZu2Hvel5C5907gUzMpm4xCrQXtRzCvsBqFjonB4m3x4LzCFI1ZKWA==", + "version": "7.65.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.65.0.tgz", + "integrity": "sha512-xtOzDz063WcXvGWaHgLNrNzlsdFgtUWcb32E6WFaGTd7kPZG3EeDusjdZfUsPwKCKVXy1ZlntifaHZ4l8pAsmw==", "license": "MIT", "engines": { "node": ">=18.0.0" @@ -6954,9 +7136,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -7421,16 +7603,16 @@ } }, "node_modules/tailwindcss": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.13.tgz", - "integrity": "sha512-i+zidfmTqtwquj4hMEwdjshYYgMbOrPzb9a0M3ZgNa0JMoZeFC6bxZvO8yr8ozS6ix2SDz0+mvryPeBs2TFE+w==", + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.14.tgz", + "integrity": "sha512-b7pCxjGO98LnxVkKjaZSDeNuljC4ueKUddjENJOADtubtdo8llTaJy7HwBMeLNSSo2N5QIAgklslK1+Ir8r6CA==", "dev": true, "license": "MIT" }, "node_modules/tapable": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.3.tgz", - "integrity": "sha512-ZL6DDuAlRlLGghwcfmSn9sK3Hr6ArtyudlSAiCqQ6IfE+b+HHbydbYDIG15IfS5do+7XQQBdBiubF/cV2dnDzg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", "dev": true, "license": "MIT", "engines": { @@ -7679,9 +7861,9 @@ } }, "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -7807,9 +7989,9 @@ } }, "node_modules/use-sync-external-store": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz", - "integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", "license": "MIT", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" @@ -7961,9 +8143,9 @@ } }, "node_modules/zod": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.11.tgz", - "integrity": "sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", + "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index 79f640a..798ea1f 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.2.6", "@radix-ui/react-tabs": "^1.1.13", "@radix-ui/react-tooltip": "^1.2.8", "@tanstack/react-table": "^8.21.3", @@ -68,6 +69,6 @@ "prettier-plugin-tailwindcss": "^0.6.14", "tailwindcss": "^4", "tw-animate-css": "^1.3.7", - "typescript": "^5" + "typescript": "5.9.3" } -} \ No newline at end of file +} diff --git a/src/app/(protected)/(administrativo)/administrativo/minutas/naturezas/page.tsx b/src/app/(protected)/(administrativo)/administrativo/minutas/naturezas/page.tsx new file mode 100644 index 0000000..557c8bf --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/minutas/naturezas/page.tsx @@ -0,0 +1,11 @@ +import GNaturezaIndex from "@/packages/administrativo/components/GNatureza/GNaturezaIndex"; + +export default function GNaturezaPage() { + + return ( + + ); + +} \ No newline at end of file diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 1c67503..fe2cf7f 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -125,6 +125,10 @@ const data = { title: 'Minuta', url: '/cadastros/minuta/', }, + { + title: 'Minuta/Naturezas', + url: '/administrativo/minutas/naturezas', + }, { title: "Censec/Tipo do Ato", url: "/cadastros/censec-tipoato" diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx new file mode 100644 index 0000000..6a2b524 --- /dev/null +++ b/src/components/ui/switch.tsx @@ -0,0 +1,31 @@ +"use client" + +import * as React from "react" +import * as SwitchPrimitive from "@radix-ui/react-switch" + +import { cn } from "@/lib/utils" + +function Switch({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { Switch } diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx new file mode 100644 index 0000000..8eb06f3 --- /dev/null +++ b/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx @@ -0,0 +1,123 @@ +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 GetCapitalize from "@/shared/actions/text/GetCapitalize"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; + +export default function GNaturezaColumns( + onEdit: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void +): ColumnDef[] { + return [ + // ID + { + accessorKey: "natureza_id", + header: ({ column }) => SortableHeader("ID", column), + cell: ({ row }) => Number(row.getValue("natureza_id")), + enableSorting: true, + }, + + // Descrição + { + accessorKey: "descricao", + header: ({ column }) => SortableHeader("Descrição", column), + cell: ({ row }) => + GetCapitalize(String(row.getValue("descricao") || "")), + }, + + // Situação + { + accessorKey: "situacao", + header: ({ column }) => SortableHeader("Situação", column), + cell: ({ row }) => { + const value = String(row.getValue("situacao") || "").toUpperCase(); + if (value === "A") return "Ativo"; + if (value === "I") return "Inativo"; + return "-"; + }, + }, + + // Sistema ID + { + accessorKey: "sistema_id", + header: ({ column }) => SortableHeader("Sistema ID", column), + cell: ({ row }) => { + const value = row.getValue("sistema_id"); + return value ? Number(value) : "-"; + }, + }, + + // Pedir Número Imóvel + { + accessorKey: "pedir_numero_imovel", + header: ({ column }) => SortableHeader("Pedir Nº Imóvel", column), + cell: ({ row }) => { + const value = String(row.getValue("pedir_numero_imovel") || "").toUpperCase(); + return value === "S" ? "Sim" : "Não"; + }, + }, + + // Controle Frente/Verso + { + accessorKey: "controle_frenteverso", + header: ({ column }) => SortableHeader("Controle Frente/Verso", column), + cell: ({ row }) => { + const value = String(row.getValue("controle_frenteverso") || "").toUpperCase(); + return value === "S" ? "Sim" : "Não"; + }, + }, + + // Ações + { + id: "actions", + header: "Ações", + cell: ({ row }) => { + const natureza = row.original; + + return ( + + + + + + + + onEdit(natureza, true)}> + + Editar + + + + + onDelete(natureza, true)} + > + + Remover + + + + + ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; +} diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx new file mode 100644 index 0000000..3673053 --- /dev/null +++ b/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx @@ -0,0 +1,175 @@ +'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 { Switch } from "@/components/ui/switch"; + +import LoadingButton from "@/shared/components/loadingButton/LoadingButton"; +import { ResetFormIfData } from "@/shared/actions/form/ResetFormIfData"; +import { useGNaturezaFormHook } from "../../hooks/GNatureza/useGNaturezaFormHook"; +import { GNaturezaFormInterface } from "../../interfaces/GNatureza/GNaturezaFormInterface"; +import SituacoesSelect from "@/shared/components/situacoes/SituacoesSelect"; + +/** + * Formulário de cadastro/edição de Natureza + * Baseado nos campos da tabela G_NATUREZA + */ +export default function GNaturezaForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: GNaturezaFormInterface) { + const form = useGNaturezaFormHook({}); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + ResetFormIfData(form, data); + }, [data, form]); + + function onError(error: any) { + console.log("Erro no formulário:", error); + } + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + Natureza de Minutas + + + Natureza de MInutas + + + {/* Formulário principal */} +
+ + {/* GRID MOBILE FIRST */} +
+ {/* DESCRIÇÃO */} +
+ ( + + Descrição + + + + + + )} + /> +
+ {/* SITUAÇÃO */} +
+ ( + + Situação + + + + )} + /> +
+ {/* PEDIR_NUMERO_IMOVEL */} +
+ ( + + Pedir Nº do Imóvel + + + field.onChange(checked ? 'S' : 'N') + } + /> + + + + )} + /> +
+ + {/* CONTROLE_FRENTEVERSO */} +
+ ( + + Controle Frente/Verso + + + field.onChange(checked ? 'S' : 'N') + } + /> + + + + )} + /> +
+
+ {/* Rodapé */} + + + + + + +
+ +
+
+ ); +} diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaIndex.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaIndex.tsx new file mode 100644 index 0000000..e99cb96 --- /dev/null +++ b/src/packages/administrativo/components/GNatureza/GNaturezaIndex.tsx @@ -0,0 +1,177 @@ +'use client'; + +import { useEffect, useState, useCallback } from 'react'; + +import Loading from '@/shared/components/loading/loading'; + +import { useGNaturezaIndexHook } from '@/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook'; +import { useGNaturezaSaveHook } from '@/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook'; +import { useGNaturezaDeleteHook } from '@/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import GNaturezaInterface from '@/packages/administrativo/interfaces/GNatureza/GNaturezaInterface'; +import Header from '@/shared/components/structure/Header'; +import GNaturezaTable from './GNaturezaTable'; +import GNaturezaForm from './GNaturezaForm'; +import { GNaturezaIndexInterface } from '../../interfaces/GNatureza/GNaturezaIndexInterface'; + +export default function GNaturezaIndex({ sistema_id }: GNaturezaIndexInterface) { + + const GNaturezaIndexParams: GNaturezaIndexInterface = { + sistema_id: sistema_id + } + + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { gNatureza, indexGNatureza } = useGNaturezaIndexHook(); + const { saveGNatureza } = useGNaturezaSaveHook(); + const { deleteGNatureza } = useGNaturezaDeleteHook(); + + // Estados + const [selectedData, setSelectedData] = 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, + handleCancel, + } = useConfirmDialog(); + + /** + * Abre o formulário no modo de edição ou criação + */ + const handleOpenForm = useCallback((data: GNaturezaInterface | null) => { + // Se não houver dados (criação), cria um objeto inicial com pessoa_tipo + const initialData: GNaturezaInterface = data ?? { sistema_id: GNaturezaIndexParams.sistema_id } as GNaturezaInterface; + setSelectedData(initialData); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedData(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: GNaturezaInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + + // Aguarda salvar o registro + await saveGNatureza(formData); + + // Remove o botão em estado de loading + setButtonIsLoading(false); + + // Atualiza a lista de dados + indexGNatureza(GNaturezaIndexParams); + }, + [saveGNatureza, indexGNatureza, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: GNaturezaInterface) => { + // 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 deleteGNatureza(itemToDelete); + + // Atualiza a lista + await indexGNatureza(GNaturezaIndexParams); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, indexGNatureza, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + indexGNatureza(GNaturezaIndexParams); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (gNatureza?.length == 0) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de andamentos */} + + {/* Modal de confirmação */} + {isConfirmOpen && ( + + )} + {/* Formulário de criação/edição */} + {isFormOpen && ( + + )} +
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaTable.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaTable.tsx new file mode 100644 index 0000000..866a76c --- /dev/null +++ b/src/packages/administrativo/components/GNatureza/GNaturezaTable.tsx @@ -0,0 +1,26 @@ +'use client'; + +import { DataTable } from "@/shared/components/dataTable/DataTable"; +import GNaturezaColumns from "./GNaturezaColumns"; +import GNaturezaTableInterface from "../../interfaces/GNatureza/GNaturezaTableInterface"; + +/** + * Componente principal da tabela de Naturezas + */ +export default function GNaturezaTable({ + data, + onEdit, + onDelete, +}: GNaturezaTableInterface) { + const columns = GNaturezaColumns(onEdit, onDelete); + return ( +
+ +
+ ); +} diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts new file mode 100644 index 0000000..5073de9 --- /dev/null +++ b/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts @@ -0,0 +1,18 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; + +async function executeGNaturezaDeleteData( + data: GNaturezaInterface +): Promise { + const api = new API(); + + return api.send({ + method: Methods.DELETE, + endpoint: `administrativo/g_natureza/${data.natureza_id}`, + }); +} + +export const GNaturezaDeleteData = withClientErrorHandler(executeGNaturezaDeleteData); \ No newline at end of file diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts new file mode 100644 index 0000000..eff3aec --- /dev/null +++ b/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts @@ -0,0 +1,18 @@ +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; + +async function executeGNaturezaIndexData( + data: GNaturezaInterface +): Promise { + const api = new API(); + + return api.send({ + method: Methods.GET, + endpoint: `administrativo/g_natureza/sistema/${data.sistema_id}`, + }); +} + +export const GNaturezaIndexData = withClientErrorHandler(executeGNaturezaIndexData); \ No newline at end of file diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts new file mode 100644 index 0000000..bd8b452 --- /dev/null +++ b/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts @@ -0,0 +1,24 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; + +async function executeGNaturezaSaveData( + data: GNaturezaInterface +): Promise { + // Verifica se existe ID para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.natureza_id); + + // Instancia o cliente da API + const api = new API(); + + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/g_natureza/${data.natureza_id || ""}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); +} + +export const GNaturezaSaveData = withClientErrorHandler(executeGNaturezaSaveData); diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts new file mode 100644 index 0000000..1d424e9 --- /dev/null +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts @@ -0,0 +1,19 @@ +import { useResponse } from "@/shared/components/response/ResponseContext"; +import { useState } from "react"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import { GNaturezaDeleteService } from "../../services/GNatureza/GNaturezaDeleteService"; + +export const useGNaturezaDeleteHook = () => { + const { setResponse } = useResponse(); + + const [gNatureza, setGNatureza] = useState(); + + const deleteGNatureza = async (data: GNaturezaInterface) => { + const response = await GNaturezaDeleteService(data); + + setGNatureza(data); + setResponse(response); + }; + + return { gNatureza, deleteGNatureza }; +}; diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts new file mode 100644 index 0000000..f2b45ed --- /dev/null +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts @@ -0,0 +1,13 @@ +import { useForm } from "react-hook-form"; +import { GNaturezaFormValues, GNaturezaSchema } from "../../schemas/GNatureza/GNaturezaSchema"; +import { zodResolver } from "@hookform/resolvers/zod"; + +export function useGNaturezaFormHook(defaults?: Partial) { + return useForm({ + resolver: zodResolver(GNaturezaSchema), + defaultValues: { + natureza_id: 0, + ...defaults, + }, + }); +} diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts new file mode 100644 index 0000000..503145b --- /dev/null +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts @@ -0,0 +1,25 @@ +'use client'; + +import { useResponse } from "@/shared/components/response/ResponseContext"; +import { useState } from "react"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import { GNaturezaIndexService } from "../../services/GNatureza/GNaturezaIndexService"; + +export const useGNaturezaIndexHook = () => { + const { setResponse } = useResponse(); + + const [gNatureza, setGNatureza] = useState([]); + + const indexGNatureza = async (data: GNaturezaInterface) => { + const response = await GNaturezaIndexService(data); + // Armazena os dados consultados + setGNatureza(response.data); + // Define a resposta (toast, modal, feedback, etc.) + setResponse(response); + }; + + return { + gNatureza, + indexGNatureza, + }; +}; diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts new file mode 100644 index 0000000..2f3130e --- /dev/null +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts @@ -0,0 +1,33 @@ +'use client'; + +import { useResponse } from "@/shared/components/response/ResponseContext"; +import { useState } from "react"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import { GNaturezaSaveService } from "../../services/GNatureza/GNaturezaSaveService"; + +export const useGNaturezaSaveHook = () => { + const { setResponse } = useResponse(); + + const [gNatureza, setGNatureza] = useState(); + + // controla se o formulário está aberto ou fechado + const [isOpen, setIsOpen] = useState(false); + + const saveGNatureza = async (data: GNaturezaInterface) => { + const response = await GNaturezaSaveService(data); + + // Armazena os dados da resposta + setGNatureza(response.data); + + // Define os dados da resposta (toast, modal, etc.) + setResponse(response); + + // Fecha o formulário automaticamente após salvar + setIsOpen(false); + + // Retorna os valores de forma imediata + return response.data; + }; + + return { gNatureza, saveGNatureza, isOpen, setIsOpen }; +}; \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/GNatureza/GNaturezaFormInterface.ts b/src/packages/administrativo/interfaces/GNatureza/GNaturezaFormInterface.ts new file mode 100644 index 0000000..57aae98 --- /dev/null +++ b/src/packages/administrativo/interfaces/GNatureza/GNaturezaFormInterface.ts @@ -0,0 +1,9 @@ +import { GNaturezaFormValues } from "../../schemas/GNatureza/GNaturezaSchema"; + +export interface GNaturezaFormInterface { + isOpen: boolean; + data: GNaturezaFormValues | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: GNaturezaFormValues) => void; + buttonIsLoading: boolean; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/GNatureza/GNaturezaIndexInterface.ts b/src/packages/administrativo/interfaces/GNatureza/GNaturezaIndexInterface.ts new file mode 100644 index 0000000..d2e02bb --- /dev/null +++ b/src/packages/administrativo/interfaces/GNatureza/GNaturezaIndexInterface.ts @@ -0,0 +1,3 @@ +export interface GNaturezaIndexInterface { + sistema_id: number +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/GNatureza/GNaturezaInterface.ts b/src/packages/administrativo/interfaces/GNatureza/GNaturezaInterface.ts new file mode 100644 index 0000000..85e6f71 --- /dev/null +++ b/src/packages/administrativo/interfaces/GNatureza/GNaturezaInterface.ts @@ -0,0 +1,8 @@ +export default interface GNaturezaInterface { + natureza_id?: number; + descricao?: string; + situacao?: string; + sistema_id?: number; + pedir_numero_imovel?: string; + controle_frenteverso?: string; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/GNatureza/GNaturezaTableInterface.ts b/src/packages/administrativo/interfaces/GNatureza/GNaturezaTableInterface.ts new file mode 100644 index 0000000..f91520e --- /dev/null +++ b/src/packages/administrativo/interfaces/GNatureza/GNaturezaTableInterface.ts @@ -0,0 +1,7 @@ +import GNaturezaInterface from "./GNaturezaInterface"; + +export default interface GNaturezaTableInterface { + data?: GNaturezaInterface[]; + onEdit: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void; +} \ No newline at end of file diff --git a/src/packages/administrativo/schemas/GNatureza/GNaturezaSchema.ts b/src/packages/administrativo/schemas/GNatureza/GNaturezaSchema.ts new file mode 100644 index 0000000..fd64991 --- /dev/null +++ b/src/packages/administrativo/schemas/GNatureza/GNaturezaSchema.ts @@ -0,0 +1,12 @@ +import z from "zod"; + +export const GNaturezaSchema = z.object({ + natureza_id: z.number().optional(), + descricao: z.string().optional(), + situacao: z.string().optional(), + sistema_id: z.number().optional(), + pedir_numero_imovel: z.string().optional(), + controle_frenteverso: z.string().optional(), +}); + +export type GNaturezaFormValues = z.infer; \ No newline at end of file diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts new file mode 100644 index 0000000..cd2735e --- /dev/null +++ b/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import { GNaturezaDeleteData } from "../../data/GNatureza/GNaturezaDeleteData"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; + +async function executeGNaturezaDeleteService(data: GNaturezaInterface) { + const response = await GNaturezaDeleteData(data); + + return response; +} + +export const GNaturezaDeleteService = withClientErrorHandler(executeGNaturezaDeleteService); diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts new file mode 100644 index 0000000..c1b1ff3 --- /dev/null +++ b/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import { GNaturezaIndexData } from "../../data/GNatureza/GNaturezaIndexData"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; + +export default async function executeGNaturezaIndexService(data: GNaturezaInterface) { + const response = await GNaturezaIndexData(data); + + return response; +} + +export const GNaturezaIndexService = withClientErrorHandler(executeGNaturezaIndexService); \ No newline at end of file diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts new file mode 100644 index 0000000..d9f9db0 --- /dev/null +++ b/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import { GNaturezaSaveData } from "../../data/GNatureza/GNaturezaSaveData"; +import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; + +async function executeGNaturezaSaveService(data: GNaturezaInterface) { + const response = await GNaturezaSaveData(data); + + return response; +} + +export const GNaturezaSaveService = withClientErrorHandler(executeGNaturezaSaveService); \ No newline at end of file diff --git a/src/shared/components/situacoes/SituacoesSelect.tsx b/src/shared/components/situacoes/SituacoesSelect.tsx new file mode 100644 index 0000000..e261b4f --- /dev/null +++ b/src/shared/components/situacoes/SituacoesSelect.tsx @@ -0,0 +1,62 @@ +import { Button } from "@/components/ui/button"; +import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"; +import { FormControl } from "@/components/ui/form"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { cn } from "@/lib/utils"; +import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import { Command } from "cmdk"; +import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; +import React from "react"; + +export default function SituacoesSelect({ field }: any) { + const [open, setOpen] = React.useState(false); + + // ✅ Corrigido para enums string-based + const options = Object.entries(SituacoesEnum).map(([value, label]) => ({ + value, + label, + })); + + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); +} diff --git a/src/shared/enums/SituacoesEnum.ts b/src/shared/enums/SituacoesEnum.ts index 0392d90..4a19449 100644 --- a/src/shared/enums/SituacoesEnum.ts +++ b/src/shared/enums/SituacoesEnum.ts @@ -1,4 +1,4 @@ export enum SituacoesEnum { - A = 'A', - I = 'I', + A = 'Ativo', + I = 'Inativo', } From 519dbf969a0729d3c51a7a70a9e3fe3a18e8fa70 Mon Sep 17 00:00:00 2001 From: keven Date: Tue, 14 Oct 2025 09:42:11 -0300 Subject: [PATCH 02/11] fix(Build): Realiza ajustes diversos para build --- .../_components/g_tb_bairro/GTBBairroForm.tsx | 6 ++---- .../_components/g_tb_bairro/GTBBairroTable.tsx | 10 ++++------ .../t_censec_tipoato/TCensecTipoAtoForm.tsx | 7 ++----- .../TCensecNaturezaLitigioForm.tsx | 9 ++++----- .../TCensecNaturezaLitigioTable.tsx | 10 ++++------ .../_interfaces/TCensecNaturezaLitigioInterface.ts | 4 +++- .../cadastros/_schemas/TCensecNaturezaLitigioSchema.ts | 3 ++- 7 files changed, 21 insertions(+), 28 deletions(-) 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 7c11262..2d11f64 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 @@ -30,6 +30,7 @@ import { Label } from '@/components/ui/label'; import { GTBBairroSchema } from '../../_schemas/GTBBairroSchema'; import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; type FormValues = z.infer; @@ -102,10 +103,7 @@ export default function GTBBairroForm({ control={form.control} render={({ field }) => (
- field.onChange(checked ? 'A' : 'I')} - /> +
)} diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroTable.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroTable.tsx index 4b9ff8d..63bee51 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroTable.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroTable.tsx @@ -19,6 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; interface GTBBairroTableProps { data: GTBBairroInterface[]; @@ -29,18 +30,15 @@ interface GTBBairroTableProps { /** * Renderiza o badge de situação */ -function StatusBadge({ situacao }: { situacao: 'A' | 'I' }) { - const isActive = situacao === 'A'; - +function StatusBadge({ situacao }: { situacao: SituacoesEnum }) { + const isActive = situacao === SituacoesEnum.A; const baseClasses = 'text-xs font-medium px-2.5 py-0.5 rounded-sm me-2'; - const activeClasses = 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300'; - const inactiveClasses = 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300'; return ( - {isActive ? 'Ativo' : 'Inativo'} + {situacao} ); } diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx index b528fa1..8f326f9 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx @@ -28,9 +28,9 @@ import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Label } from "@/components/ui/label"; import { TCensecTipoAtoSchema } from "../../_schemas/TCensecTipoAtoSchema"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; import TCensecInterface from "../../_interfaces/TCensecInterface"; import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import SituacoesSelect from "@/shared/components/situacoes/SituacoesSelect"; type FormValues = z.infer; @@ -139,10 +139,7 @@ export default function TCensecTipoAtoForm({ control={form.control} render={({ field }) => (
- field.onChange(checked ? "A" : "I")} - /> +
)} 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 9aa91e6..fefa2c8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx @@ -29,6 +29,8 @@ import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { TCensecNaturezaLitigioSchema } from '../../_schemas/TCensecNaturezaLitigioSchema'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; type FormValues = z.infer; @@ -52,7 +54,7 @@ export default function TCensecNaturezaLitigioForm({ defaultValues: { censec_naturezalitigio_id: 0, descricao: '', - situacao: 'A', + situacao: SituacoesEnum.A, }, }); @@ -96,10 +98,7 @@ export default function TCensecNaturezaLitigioForm({ control={form.control} render={({ field }) => (
- field.onChange(checked ? 'A' : 'I')} - /> +
)} diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioTable.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioTable.tsx index 626fa30..d51e770 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioTable.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioTable.tsx @@ -19,6 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; interface TCensecNaturezaLitigioTableProps { data: TCensecNaturezaLitigioInterface[]; @@ -29,18 +30,15 @@ interface TCensecNaturezaLitigioTableProps { /** * Renderiza o badge de situação */ -function StatusBadge({ situacao }: { situacao: 'A' | 'I' }) { - const isActive = situacao === 'A'; - +function StatusBadge({ situacao }: { situacao: SituacoesEnum }) { + const isActive = situacao === SituacoesEnum.A; const baseClasses = 'text-xs font-medium px-2.5 py-0.5 rounded-sm me-2'; - const activeClasses = 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300'; - const inactiveClasses = 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300'; return ( - {isActive ? 'Ativo' : 'Inativo'} + {situacao} ); } diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecNaturezaLitigioInterface.ts b/src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecNaturezaLitigioInterface.ts index 3d91f1b..ec119f0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecNaturezaLitigioInterface.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecNaturezaLitigioInterface.ts @@ -1,5 +1,7 @@ +import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; + export interface TCensecNaturezaLitigioInterface { censec_naturezalitigio_id?: number; descricao: string; - situacao: 'A' | 'I'; + situacao: SituacoesEnum; } diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecNaturezaLitigioSchema.ts b/src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecNaturezaLitigioSchema.ts index 02f5506..2e14068 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecNaturezaLitigioSchema.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecNaturezaLitigioSchema.ts @@ -1,7 +1,8 @@ +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import { z } from 'zod'; export const TCensecNaturezaLitigioSchema = z.object({ censec_naturezalitigio_id: z.number().optional(), descricao: z.string().min(1, 'O campo deve ser preenchido'), - situacao: z.enum(['A', 'I']), + situacao: z.enum(SituacoesEnum), }); From aaaa04975e17a90fba570f8b5947301692e118e3 Mon Sep 17 00:00:00 2001 From: keven Date: Wed, 15 Oct 2025 15:37:17 -0300 Subject: [PATCH 03/11] [MVPTN-100] feat(CRUD): Criar o CRUD de T_ATO_PARTETIPO --- .../administrativo/atos/partes-tipos/page.tsx | 9 + .../administrativo/censec/qualidades/page.tsx | 9 + src/components/app-sidebar.tsx | 8 + .../TAtoParteTipo/TAtoParteTipoColumns.tsx | 129 +++++++++++ .../TAtoParteTipo/TAtoParteTipoForm.tsx | 218 ++++++++++++++++++ .../TAtoParteTipo/TAtoParteTipoIndex.tsx | 172 ++++++++++++++ .../TAtoParteTipo/TAtoParteTipoTable.tsx | 22 ++ .../TCensecQualidadeColumns.tsx | 76 ++++++ .../TCensecQualidade/TCensecQualidadeForm.tsx | 132 +++++++++++ .../TCensecQualidadeIndex.tsx | 172 ++++++++++++++ .../TCensecQualidadeSelect.tsx | 92 ++++++++ .../TCensecQualidadeTable.tsx | 22 ++ .../TAtoTipoParte/TAtoTipoParteDeleteData.ts | 18 ++ .../TAtoTipoParte/TAtoTipoParteIndexData.ts | 14 ++ .../TAtoTipoParte/TAtoTipoParteSaveData.ts | 24 ++ .../TCensecQualidadeDeleteData.ts | 18 ++ .../TCensecQualidadeIndexData.ts | 14 ++ .../TCensecQualidadeSaveData.ts | 24 ++ .../useTAtoParteTipoDeleteHook.ts | 20 ++ .../TAtoParteTipo/useTAtoParteTipoFormHook.ts | 13 ++ .../useTAtoParteTipoIndexHook.ts | 25 ++ .../TAtoParteTipo/useTAtoParteTipoSaveHook.ts | 33 +++ .../useTCensecQualidadeDeleteHook.ts | 20 ++ .../useTCensecQualidadeHook.ts | 13 ++ .../useTCensecQualidadeIndexHook.ts | 25 ++ .../useTCensecQualidadeSaveHook.ts | 33 +++ .../TAtoParteTipoFormInterface.ts | 9 + .../TAtoParteTipo/TAtoParteTipoInterface.ts | 11 + .../TAtoParteTipoTableInterface.ts | 7 + .../TCensecQualidadeFormInterface.ts | 9 + .../TCensecQualidadeInterface.ts | 9 + .../TCensecQualidadeTableInterface.ts | 7 + .../TAtoParteTipo/TAtoParteTipoSchema.ts | 15 ++ .../TCensecQualdiadeSchema.ts | 12 + .../TAtoParteTipoDeleteService.ts | 11 + .../TAtoParteTipoIndexService.ts | 10 + .../TAtoParteTipo/TAtoParteTipoSaveService.ts | 11 + .../TCensecQualidadeDeleteService.ts | 11 + .../TCensecQualidadeIndexService.ts | 10 + .../TCensecQualidadeSaveService.ts | 10 + .../confirmacao/ConfirmacaoSelect.tsx | 61 +++++ .../tipoDaParte/TipoDaParteSelect.tsx | 86 +++++++ src/shared/enums/ConfirmacaoEnum.ts | 4 + src/shared/enums/TIpoDaParteEnum.ts | 8 + 44 files changed, 1656 insertions(+) create mode 100644 src/app/(protected)/(administrativo)/administrativo/atos/partes-tipos/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/censec/qualidades/page.tsx create mode 100644 src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx create mode 100644 src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx create mode 100644 src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex.tsx create mode 100644 src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoTable.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeColumns.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeSelect.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx create mode 100644 src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts create mode 100644 src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteIndexData.ts create mode 100644 src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts create mode 100644 src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts create mode 100644 src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeIndexData.ts create mode 100644 src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts create mode 100644 src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook.ts create mode 100644 src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts create mode 100644 src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook.ts create mode 100644 src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook.ts create mode 100644 src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoFormInterface.ts create mode 100644 src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface.ts create mode 100644 src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoTableInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeFormInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeTableInterface.ts create mode 100644 src/packages/administrativo/schemas/TAtoParteTipo/TAtoParteTipoSchema.ts create mode 100644 src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts create mode 100644 src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoDeleteService.ts create mode 100644 src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoIndexService.ts create mode 100644 src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts create mode 100644 src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts create mode 100644 src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts create mode 100644 src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts create mode 100644 src/shared/components/confirmacao/ConfirmacaoSelect.tsx create mode 100644 src/shared/components/tipoDaParte/TipoDaParteSelect.tsx create mode 100644 src/shared/enums/ConfirmacaoEnum.ts create mode 100644 src/shared/enums/TIpoDaParteEnum.ts diff --git a/src/app/(protected)/(administrativo)/administrativo/atos/partes-tipos/page.tsx b/src/app/(protected)/(administrativo)/administrativo/atos/partes-tipos/page.tsx new file mode 100644 index 0000000..c00fb3e --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/atos/partes-tipos/page.tsx @@ -0,0 +1,9 @@ +import TAtoParteTipoIndex from "@/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex"; + +export default function TAtoParteTipo() { + + return ( + < TAtoParteTipoIndex /> + ); + +} \ No newline at end of file diff --git a/src/app/(protected)/(administrativo)/administrativo/censec/qualidades/page.tsx b/src/app/(protected)/(administrativo)/administrativo/censec/qualidades/page.tsx new file mode 100644 index 0000000..234dcb3 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/censec/qualidades/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import TCensecQualidadeIndex from "@/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex"; + +export default function TImovelRuralPage() { + return ( + < TCensecQualidadeIndex /> + ); +} diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index fe2cf7f..60b7305 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -133,6 +133,10 @@ const data = { title: "Censec/Tipo do Ato", url: "/cadastros/censec-tipoato" }, + { + title: "Censec/Qualidades", + url: "/administrativo/censec/qualidades" + }, { title: 'Censec/Centrais', url: '/cadastros/censec/', @@ -145,6 +149,10 @@ const data = { title: "Regimes/Comunhão", url: "/cadastros/regime-comunhao/", }, + { + title: "Atos/Partes Tipos", + url: "/administrativo/atos/partes-tipos", + }, ], }, diff --git a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx new file mode 100644 index 0000000..a7bbdbf --- /dev/null +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx @@ -0,0 +1,129 @@ +import { ColumnDef } from "@tanstack/react-table"; +import TAtoParteTipoInterface from "../../interfaces/TAtoParteTipo/TAtoParteTipoInterface"; +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 GetCapitalize from "@/shared/actions/text/GetCapitalize"; +import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; +import { TipoDaParteEnum } from "@/shared/enums/TIpoDaParteEnum"; + +export default function TAtoParteTipoColumns( + onEdit: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void +): ColumnDef[] { + return [ + // ID + { + accessorKey: "ato_partetipo_id", + header: ({ column }) => SortableHeader("#", column), + cell: ({ row }) => Number(row.getValue("ato_partetipo_id")), + enableSorting: false, + }, + + // Descrição + { + accessorKey: "descricao", + header: ({ column }) => SortableHeader("Descrição", column), + cell: ({ row }) => GetCapitalize(row.getValue("descricao")), + }, + + // Tipo de Parte + { + accessorKey: "tipo_parte", + header: ({ column }) => SortableHeader("Tipo Parte", column), + cell: ({ row }) => { + const value = row.getValue("tipo_parte") as keyof typeof TipoDaParteEnum; + return TipoDaParteEnum[value] ?? "-"; + }, + }, + + // Auto Qualifica + { + accessorKey: "auto_qualifica", + header: ({ column }) => SortableHeader("Auto Qualifica", column), + cell: ({ row }) => { + const value = row.getValue("auto_qualifica") as keyof typeof ConfirmacaoEnum; + return ConfirmacaoEnum[value] ?? "-"; + }, + }, + + // Declara DOI + { + accessorKey: "declara_doi", + header: ({ column }) => SortableHeader("Declara DOI", column), + cell: ({ row }) => { + const value = row.getValue("declara_doi") as keyof typeof ConfirmacaoEnum; + return ConfirmacaoEnum[value] ?? "-"; + }, + }, + + // Possui Documento Externo + { + accessorKey: "possui_documento_ext", + header: ({ column }) => SortableHeader("Doc. Externo", column), + cell: ({ row }) => { + const value = row.getValue("possui_documento_ext") as keyof typeof ConfirmacaoEnum; + return ConfirmacaoEnum[value] ?? "-"; + }, + }, + + // Situação + { + accessorKey: "situacao", + header: ({ column }) => SortableHeader("Situação", column), + cell: ({ row }) => { + const value = row.getValue("situacao") as keyof typeof SituacoesEnum; + return SituacoesEnum[value] ?? "-"; + }, + }, + + // 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/components/TAtoParteTipo/TAtoParteTipoForm.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx new file mode 100644 index 0000000..1bb2f19 --- /dev/null +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx @@ -0,0 +1,218 @@ +'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 { useTAtoParteTipoFormHook } from '../../hooks/TAtoParteTipo/useTAtoParteTipoFormHook'; +import { TAtoParteTipoFormInterface } from '../../interfaces/TAtoParteTipo/TAtoParteTipoFormInterface'; +import { Switch } from '@/components/ui/switch'; +import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; +import TCensecQualidadeSelect from '../TCensecQualidade/TCensecQualidadeSelect'; +import TipoDaParteSelect from '@/shared/components/tipoDaParte/TipoDaParteSelect'; + +export default function TAtoParteTipoForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TAtoParteTipoFormInterface) { + + // Inicializa o react-hook-form com schema zod + const form = useTAtoParteTipoFormHook({}); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + + // Se existir dados, reseta o formulário com os mesmos + ResetFormIfData(form, data); + + }, [data, form]); + + function onError(error: any) { + console.log(error); + } + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + Tipo de Partes do Ato + + + Tipo de Partes do Ato + + +
+ +
+ {/* Descrição */} +
+ ( + + Descrição + + + + + + )} + /> +
+ {/* Tipo da Parte */} +
+ ( + + Tipo da Parte + < TipoDaParteSelect field={field} /> + + + )} + /> +
+ {/* Qualidade */} +
+ ( + + Censec Qualidade + < TCensecQualidadeSelect field={field} /> + + + )} + /> +
+ {/* Auto Qualifica */} +
+ ( + + Auto Qualifica + + + field.onChange(checked ? 'S' : 'N') + } + /> + + + + )} + /> +
+ {/* Declara Doi */} +
+ ( + + Declarar Doi + + + field.onChange(checked ? 'S' : 'N') + } + /> + + + + )} + /> +
+ {/* Possui Documento Externo */} +
+ ( + + Possui Documento Externo + + + field.onChange(checked ? 'S' : 'N') + } + /> + + + + )} + /> +
+ {/* Situação */} +
+ ( + + Situação + + + field.onChange(checked ? 'A' : 'I') + } + /> + + + + )} + /> +
+
+ {/* Rodapé do Dialog */} + + + + + + +
+ +
+
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex.tsx new file mode 100644 index 0000000..2cb0286 --- /dev/null +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex.tsx @@ -0,0 +1,172 @@ +'use client'; + +import { useEffect, useState, useCallback } from 'react'; + +import Loading from '@/shared/components/loading/loading'; + +import { useTAtoParteTipoIndexHook } from '@/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook'; +import { useTAtoParteTipoSaveHook } from '@/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook'; +import { useTAtoParteTipoDeleteHook } from '@/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import TAtoParteTipoInterface from '@/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import Header from '@/shared/components/structure/Header'; +import TAtoParteTipoTable from './TAtoParteTipoTable'; +import TAtoParteTipoForm from './TAtoParteTipoForm'; + +export default function TAtoParteTipoIndex() { + + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { tAtoParteTipo, indexTAtoParteTipo } = useTAtoParteTipoIndexHook(); + const { saveTAtoParteTipo } = useTAtoParteTipoSaveHook(); + const { deleteTAtoParteTipo } = useTAtoParteTipoDeleteHook(); + + // Estados + const [selectedData, setSelectedData] = 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: TAtoParteTipoInterface | null) => { + // Se não houver dados (criação), cria um objeto inicial com pessoa_tipo + setSelectedData(data); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedData(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TAtoParteTipoInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + + // Aguarda salvar o registro + await saveTAtoParteTipo(formData); + + // Remove o botão em estado de loading + setButtonIsLoading(false); + + // Atualiza a lista de dados + indexTAtoParteTipo(); + }, + [saveTAtoParteTipo, indexTAtoParteTipo, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TAtoParteTipoInterface) => { + // 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 deleteTAtoParteTipo(itemToDelete); + + // Atualiza a lista + await indexTAtoParteTipo(); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, indexTAtoParteTipo, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + indexTAtoParteTipo(); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (tAtoParteTipo?.length == 0) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de andamentos */} + + {/* Modal de confirmação */} + {isConfirmOpen && ( + + )} + {/* Formulário de criação/edição */} + {isFormOpen && ( + + )} +
+ ); +} diff --git a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoTable.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoTable.tsx new file mode 100644 index 0000000..7280378 --- /dev/null +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoTable.tsx @@ -0,0 +1,22 @@ +'use client'; + +import { DataTable } from '@/shared/components/dataTable/DataTable'; +import TAtoParteTipoColumns from './TAtoParteTipoColumns'; +import TAtoParteTipoTableInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoTableInterface'; + +/** + * Componente principal da tabela + */ +export default function TAtoParteTipoTable({ data, onEdit, onDelete }: TAtoParteTipoTableInterface) { + const columns = TAtoParteTipoColumns(onEdit, onDelete); + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeColumns.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeColumns.tsx new file mode 100644 index 0000000..7410ba2 --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeColumns.tsx @@ -0,0 +1,76 @@ +import { ColumnDef } from "@tanstack/react-table"; +import TCensecQualidadeInterface from "../../interfaces/TCensecQualidade/TCensecQualidadeInterface"; +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 GetCapitalize from "@/shared/actions/text/GetCapitalize"; + +export default function TCensecQualidadeColumns( + onEdit: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void +): ColumnDef[] { + return [ + // ID + { + accessorKey: "censec_qualidade_id", + header: ({ column }) => SortableHeader("#", column), + cell: ({ row }) => Number(row.getValue("censec_qualidade_id")), + enableSorting: false, + }, + + // Descrição + { + accessorKey: "descricao", + header: ({ column }) => SortableHeader("Descrição", column), + cell: ({ row }) => GetCapitalize(row.getValue("descricao")), + }, + + // 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/components/TCensecQualidade/TCensecQualidadeForm.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx new file mode 100644 index 0000000..bb03cb4 --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx @@ -0,0 +1,132 @@ +'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 { useTCensecQualidadeFormHook } from '../../hooks/TCensecQualidade/useTCensecQualidadeHook'; +import { TCensecQualidadeFormInterface } from '../../interfaces/TCensecQualidade/TCensecQualidadeFormInterface'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; +import ConfirmacaoSelect from '@/shared/components/confirmacao/ConfirmacaoSelect'; + +export default function TCensecQualidadeForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TCensecQualidadeFormInterface) { + + // Inicializa o react-hook-form com schema zod + const form = useTCensecQualidadeFormHook({}); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + + // Se existir dados, reseta o formulário com os mesmos + ResetFormIfData(form, data); + + }, [data, form]); + + function onError(error: any) { + console.log(error); + } + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + Tipo de Partes do Ato + + + Tipo de Partes do Ato + + +
+ +
+ {/* Descrição */} +
+ ( + + Descrição + + + + + + )} + /> +
+ {/* SITUAÇÃO */} +
+ ( + + Situação + + + + )} + /> +
+ {/* Aceita CNPJ */} +
+ ( + + Aceita CNPJ + + + + )} + /> +
+
+ {/* Rodapé do Dialog */} + + + + + + +
+ +
+
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex.tsx new file mode 100644 index 0000000..dfb248b --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex.tsx @@ -0,0 +1,172 @@ +'use client'; + +import { useEffect, useState, useCallback } from 'react'; + +import Loading from '@/shared/components/loading/loading'; + +import { useTCensecQualidadeIndexHook } from '@/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook'; +import { useTCensecQualidadeSaveHook } from '@/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook'; +import { useTCensecQualidadeDeleteHook } from '@/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import TCensecQualidadeInterface from '@/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import Header from '@/shared/components/structure/Header'; +import TCensecQualidadeTable from './TCensecQualidadeTable'; +import TCensecQualidadeForm from './TCensecQualidadeForm'; + +export default function TCensecQualidadeIndex() { + + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { tCensecQualidade, indexTCensecQualidade } = useTCensecQualidadeIndexHook(); + const { saveTCensecQualidade } = useTCensecQualidadeSaveHook(); + const { deleteTCensecQualidade } = useTCensecQualidadeDeleteHook(); + + // Estados + const [selectedData, setSelectedData] = 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: TCensecQualidadeInterface | null) => { + // Se não houver dados (criação), cria um objeto inicial com pessoa_tipo + setSelectedData(data); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedData(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TCensecQualidadeInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + + // Aguarda salvar o registro + await saveTCensecQualidade(formData); + + // Remove o botão em estado de loading + setButtonIsLoading(false); + + // Atualiza a lista de dados + indexTCensecQualidade(); + }, + [saveTCensecQualidade, indexTCensecQualidade, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TCensecQualidadeInterface) => { + // 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 deleteTCensecQualidade(itemToDelete); + + // Atualiza a lista + await indexTCensecQualidade(); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, indexTCensecQualidade, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + indexTCensecQualidade(); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (tCensecQualidade?.length == 0) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de andamentos */} + + {/* Modal de confirmação */} + {isConfirmOpen && ( + + )} + {/* Formulário de criação/edição */} + {isFormOpen && ( + + )} +
+ ); +} diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeSelect.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeSelect.tsx new file mode 100644 index 0000000..e8fcdb5 --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeSelect.tsx @@ -0,0 +1,92 @@ +'use client'; + +import React from "react"; +import { Button } from "@/components/ui/button"; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from "@/components/ui/command"; +import { FormControl } from "@/components/ui/form"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { cn } from "@/lib/utils"; +import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; +import GetCapitalize from "@/shared/actions/text/GetCapitalize"; +import { useTCensecQualidadeIndexHook } from "../../hooks/TCensecQualidade/useTCensecQualidadeIndexHook"; + +export default function TCensecQualidadeSelect({ field }: any) { + const [open, setOpen] = React.useState(false); + const [isLoading, setIsLoading] = React.useState(false); + const { tCensecQualidade, indexTCensecQualidade } = useTCensecQualidadeIndexHook(); + // Busca os dados uma única vez ao montar + React.useEffect(() => { + const loadData = async () => { + if (!tCensecQualidade.length) { + setIsLoading(true); + await indexTCensecQualidade(); + setIsLoading(false); + } + }; + loadData(); + }, []); + const selected = tCensecQualidade.find( + (item) => String(item.censec_qualidade_id) === String(field.value) + ); + return ( + + + + + + + + + + + + {isLoading ? "Carregando..." : "Nenhum resultado encontrado."} + + + {tCensecQualidade?.map((item) => ( + { + field.onChange(Number(item.censec_qualidade_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + ); +} diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx new file mode 100644 index 0000000..3f9a84a --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx @@ -0,0 +1,22 @@ +'use client'; + +import { DataTable } from '@/shared/components/dataTable/DataTable'; +import TCensecQualidadeColumns from './TCensecQualidadeColumns'; +import TCensecQualidadeTableInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeTableInterface'; + +/** + * Componente principal da tabela + */ +export default function TCensecQualidadeTable({ data, onEdit, onDelete }: TCensecQualidadeTableInterface) { + const columns = TCensecQualidadeColumns(onEdit, onDelete); + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts new file mode 100644 index 0000000..b63016d --- /dev/null +++ b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts @@ -0,0 +1,18 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import TAtoParteTipoInterface from "../../interfaces/TAtoParteTipo/TAtoParteTipoInterface"; + +async function executeTAtoParteTipoDeleteData(data: TAtoParteTipoInterface): Promise { + + const api = new API(); + + return await api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_ato_partetipo/${data.ato_partetipo_id}` + }); + +} + +export const TAtoParteTipoDeleteData = withClientErrorHandler(executeTAtoParteTipoDeleteData); \ No newline at end of file diff --git a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteIndexData.ts b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteIndexData.ts new file mode 100644 index 0000000..c6a3689 --- /dev/null +++ b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteIndexData.ts @@ -0,0 +1,14 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; + +async function executeTAtoParteTipoIndexData(): Promise { + const api = new API(); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/t_ato_partetipo` + }); +} + +export const TAtoParteTipoIndexData = withClientErrorHandler(executeTAtoParteTipoIndexData); \ No newline at end of file diff --git a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts new file mode 100644 index 0000000..5159911 --- /dev/null +++ b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts @@ -0,0 +1,24 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import TAtoParteTipoInterface from "../../interfaces/TAtoParteTipo/TAtoParteTipoInterface"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; + +async function executeTAtoParteTipoSaveData(data: TAtoParteTipoInterface): Promise { + + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.ato_partetipo_id); + + // Instancia o cliente da API para enviar a requisição + const api = new API(); + + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_ato_partetipo/${data.ato_partetipo_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); + +} + +export const TAtoParteTipoSaveData = withClientErrorHandler(executeTAtoParteTipoSaveData); \ No newline at end of file diff --git a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts new file mode 100644 index 0000000..9cf7b8c --- /dev/null +++ b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts @@ -0,0 +1,18 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import TCensecQualidadeInterface from "../../interfaces/TCensecQualidade/TCensecQualidadeInterface"; + +async function executeTCensecQualidadeDeleteData(data: TCensecQualidadeInterface): Promise { + + const api = new API(); + + return await api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_censec_qualidade/${data.censec_qualidade_id}` + }); + +} + +export const TCensecQualidadeDeleteData = withClientErrorHandler(executeTCensecQualidadeDeleteData); \ No newline at end of file diff --git a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeIndexData.ts b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeIndexData.ts new file mode 100644 index 0000000..7210da9 --- /dev/null +++ b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeIndexData.ts @@ -0,0 +1,14 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; + +async function executeTCensecQualidadeIndexData(): Promise { + const api = new API(); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/t_censec_qualidade` + }); +} + +export const TCensecQualidadeIndexData = withClientErrorHandler(executeTCensecQualidadeIndexData); \ No newline at end of file diff --git a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts new file mode 100644 index 0000000..36d5811 --- /dev/null +++ b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts @@ -0,0 +1,24 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import TCensecQualidadeInterface from "../../interfaces/TCensecQualidade/TCensecQualidadeInterface"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; + +async function executeTCensecQualidadeSaveData(data: TCensecQualidadeInterface): Promise { + + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.censec_qualidade_id); + + // Instancia o cliente da API para enviar a requisição + const api = new API(); + + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_censec_qualidade/${data.censec_qualidade_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); + +} + +export const TCensecQualidadeSaveData = withClientErrorHandler(executeTCensecQualidadeSaveData); \ No newline at end of file diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook.ts new file mode 100644 index 0000000..bf0d023 --- /dev/null +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook.ts @@ -0,0 +1,20 @@ +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import { TAtoParteTipoDeleteService } from '../../services/TAtoParteTipo/TAtoParteTipoDeleteService'; + +export const useTAtoParteTipoDeleteHook = () => { + const { setResponse } = useResponse(); + + const [tAtoParteTipo, setTAtoParteTipo] = useState(); + + const deleteTAtoParteTipo = async (data: TAtoParteTipoInterface) => { + const response = await TAtoParteTipoDeleteService(data); + + setTAtoParteTipo(data); + + setResponse(response); + }; + + return { tAtoParteTipo, deleteTAtoParteTipo }; +}; diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts new file mode 100644 index 0000000..cdd42a7 --- /dev/null +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts @@ -0,0 +1,13 @@ +import { useForm } from "react-hook-form"; +import { TAtoParteTipoFormValues, TAtoParteTipoSchema } from "../../schemas/TAtoParteTipo/TAtoParteTipoSchema"; +import { zodResolver } from "@hookform/resolvers/zod"; + +export function useTAtoParteTipoFormHook(defaults?: Partial) { + return useForm({ + resolver: zodResolver(TAtoParteTipoSchema), + defaultValues: { + ato_partetipo_id: 0, + ...defaults, + }, + }); +} \ No newline at end of file diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook.ts new file mode 100644 index 0000000..d59c682 --- /dev/null +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook.ts @@ -0,0 +1,25 @@ +'use client'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import { TAtoParteTipoIndexService } from '../../services/TAtoParteTipo/TAtoParteTipoIndexService'; + +export const useTAtoParteTipoIndexHook = () => { + const { setResponse } = useResponse(); + + const [tAtoParteTipo, setTAtoParteTipo] = useState([]); + + const indexTAtoParteTipo = async () => { + const response = await TAtoParteTipoIndexService(); + // Armazena os dados consultados + setTAtoParteTipo(response.data); + // Define os dados do componente de resposta (toast, modal, etc) + setResponse(response); + }; + + return { + tAtoParteTipo, + indexTAtoParteTipo + }; +}; diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook.ts new file mode 100644 index 0000000..9721721 --- /dev/null +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook.ts @@ -0,0 +1,33 @@ +'use client'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import { TAtoParteTipoSaveService } from '../../services/TAtoParteTipo/TAtoParteTipoSaveService'; + +export const useTAtoParteTipoSaveHook = () => { + const { setResponse } = useResponse(); + + const [tAtoParteTipo, setTAtoParteTipo] = useState(); + + // controla se o formulário está aberto ou fechado + const [isOpen, setIsOpen] = useState(false); + + const saveTAtoParteTipo = async (data: TAtoParteTipoInterface) => { + const response = await TAtoParteTipoSaveService(data); + + // Armazena os dados da repsota + setTAtoParteTipo(response.data); + + // Define os dados da respota(toast, modal, etc) + setResponse(response); + + // Fecha o formulário automaticamente após salvar + setIsOpen(false); + + // Retorna os valores de forma imediata + return response.data; + }; + + return { tAtoParteTipo, saveTAtoParteTipo }; +}; diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook.ts new file mode 100644 index 0000000..cecbe09 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook.ts @@ -0,0 +1,20 @@ +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import { TCensecQualidadeDeleteService } from '../../services/TCensecQualidade/TCensecQualidadeDeleteService'; + +export const useTCensecQualidadeDeleteHook = () => { + const { setResponse } = useResponse(); + + const [tCensecQualidade, setTCensecQualidade] = useState(); + + const deleteTCensecQualidade = async (data: TCensecQualidadeInterface) => { + const response = await TCensecQualidadeDeleteService(data); + + setTCensecQualidade(data); + + setResponse(response); + }; + + return { tCensecQualidade, deleteTCensecQualidade }; +}; diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts new file mode 100644 index 0000000..4c0bd13 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts @@ -0,0 +1,13 @@ +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { TCensecQualidadeFormValues, TCensecQualidadeSchema } from "../../schemas/TCensecQualidade/TCensecQualdiadeSchema"; + +export function useTCensecQualidadeFormHook(defaults?: Partial) { + return useForm({ + resolver: zodResolver(TCensecQualidadeSchema), + defaultValues: { + censec_qualidade_id: 0, + ...defaults, + }, + }); +} \ No newline at end of file diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook.ts new file mode 100644 index 0000000..826b5d9 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook.ts @@ -0,0 +1,25 @@ +'use client'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import { TCensecQualidadeIndexService } from '../../services/TCensecQualidade/TCensecQualidadeIndexService'; + +export const useTCensecQualidadeIndexHook = () => { + const { setResponse } = useResponse(); + + const [tCensecQualidade, setTCensecQualidade] = useState([]); + + const indexTCensecQualidade = async () => { + const response = await TCensecQualidadeIndexService(); + // Armazena os dados consultados + setTCensecQualidade(response.data); + // Define os dados do componente de resposta (toast, modal, etc) + setResponse(response); + }; + + return { + tCensecQualidade, + indexTCensecQualidade + }; +}; diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook.ts new file mode 100644 index 0000000..81301cb --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook.ts @@ -0,0 +1,33 @@ +'use client'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import { TCensecQualidadeSaveService } from '../../services/TCensecQualidade/TCensecQualidadeSaveService'; + +export const useTCensecQualidadeSaveHook = () => { + const { setResponse } = useResponse(); + + const [tCensecQualidade, setTCensecQualidade] = useState(); + + // controla se o formulário está aberto ou fechado + const [isOpen, setIsOpen] = useState(false); + + const saveTCensecQualidade = async (data: TCensecQualidadeInterface) => { + const response = await TCensecQualidadeSaveService(data); + + // Armazena os dados da repsota + setTCensecQualidade(response.data); + + // Define os dados da respota(toast, modal, etc) + setResponse(response); + + // Fecha o formulário automaticamente após salvar + setIsOpen(false); + + // Retorna os valores de forma imediata + return response.data; + }; + + return { tCensecQualidade, saveTCensecQualidade }; +}; diff --git a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoFormInterface.ts b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoFormInterface.ts new file mode 100644 index 0000000..cd6dc9f --- /dev/null +++ b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoFormInterface.ts @@ -0,0 +1,9 @@ +import { TAtoParteTipoFormValues } from "../../schemas/TAtoParteTipo/TAtoParteTipoSchema"; + +export interface TAtoParteTipoFormInterface { + isOpen: boolean; + data: TAtoParteTipoFormValues | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: TAtoParteTipoFormValues) => void; + buttonIsLoading: boolean; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface.ts b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface.ts new file mode 100644 index 0000000..00a37d2 --- /dev/null +++ b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface.ts @@ -0,0 +1,11 @@ +export default interface TAtoParteTipoInterface { + ato_partetipo_id?: number; + descricao?: string; + tipo_parte?: number; + auto_qualifica?: string; + declara_doi?: string; + possui_documento_ext?: string; + situacao?: string; + texto?: string; + censec_qualidade_id?: number; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoTableInterface.ts b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoTableInterface.ts new file mode 100644 index 0000000..89422cf --- /dev/null +++ b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoTableInterface.ts @@ -0,0 +1,7 @@ +import TAtoParteTipoInterface from "./TAtoParteTipoInterface"; + +export default interface TAtoParteTipoTableInterface { + data?: TAtoParteTipoInterface[]; + onEdit: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeFormInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeFormInterface.ts new file mode 100644 index 0000000..a01846a --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeFormInterface.ts @@ -0,0 +1,9 @@ +import { TCensecQualidadeFormValues } from "../../schemas/TCensecQualidade/TCensecQualdiadeSchema"; + +export interface TCensecQualidadeFormInterface { + isOpen: boolean; + data: TCensecQualidadeFormValues | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: TCensecQualidadeFormValues) => void; + buttonIsLoading: boolean; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface.ts new file mode 100644 index 0000000..b82a048 --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface.ts @@ -0,0 +1,9 @@ +import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; +import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; + +export default interface TCensecQualidadeInterface { + censec_qualidade_id?: number, + descricao?: string, + situacao?: SituacoesEnum, + aceita_cnpj?: ConfirmacaoEnum, +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeTableInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeTableInterface.ts new file mode 100644 index 0000000..c86addb --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeTableInterface.ts @@ -0,0 +1,7 @@ +import TCensecQualidadeInterface from "./TCensecQualidadeInterface"; + +export default interface TCensecQualidadeTableInterface { + data?: TCensecQualidadeInterface[]; + onEdit: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void; +} \ No newline at end of file diff --git a/src/packages/administrativo/schemas/TAtoParteTipo/TAtoParteTipoSchema.ts b/src/packages/administrativo/schemas/TAtoParteTipo/TAtoParteTipoSchema.ts new file mode 100644 index 0000000..e5abd14 --- /dev/null +++ b/src/packages/administrativo/schemas/TAtoParteTipo/TAtoParteTipoSchema.ts @@ -0,0 +1,15 @@ +import z from "zod"; + +export const TAtoParteTipoSchema = z.object({ + ato_partetipo_id: z.number().optional(), + descricao: z.string().optional(), + tipo_parte: z.number().optional(), + auto_qualifica: z.string().optional(), + declara_doi: z.string().optional(), + possui_documento_ext: z.string().optional(), + situacao: z.string().optional(), + texto: z.string().optional(), + censec_qualidade_id: z.number().optional(), +}); + +export type TAtoParteTipoFormValues = z.infer; \ No newline at end of file diff --git a/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts b/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts new file mode 100644 index 0000000..2c426be --- /dev/null +++ b/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts @@ -0,0 +1,12 @@ +import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; +import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import z from "zod"; + +export const TCensecQualidadeSchema = z.object({ + censec_qualidade_id: z.number().optional(), + descricao: z.string().optional(), + situacao: z.enum(SituacoesEnum).optional(), + aceita_cnpj: z.enum(ConfirmacaoEnum).optional(), +}); + +export type TCensecQualidadeFormValues = z.infer; \ No newline at end of file diff --git a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoDeleteService.ts b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoDeleteService.ts new file mode 100644 index 0000000..8ed5fc3 --- /dev/null +++ b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoDeleteService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import { TAtoParteTipoDeleteData } from '../../data/TAtoTipoParte/TAtoTipoParteDeleteData'; + +async function executeTAtoParteTipoDeleteService(data: TAtoParteTipoInterface) { + const response = await TAtoParteTipoDeleteData(data); + + return response; +} + +export const TAtoParteTipoDeleteService = withClientErrorHandler(executeTAtoParteTipoDeleteService); diff --git a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoIndexService.ts b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoIndexService.ts new file mode 100644 index 0000000..d6a9203 --- /dev/null +++ b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoIndexService.ts @@ -0,0 +1,10 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TAtoParteTipoIndexData } from '../../data/TAtoTipoParte/TAtoTipoParteIndexData'; + +export default async function executeTAtoParteTipoIndexService() { + const response = await TAtoParteTipoIndexData(); + + return response; +} + +export const TAtoParteTipoIndexService = withClientErrorHandler(executeTAtoParteTipoIndexService); diff --git a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts new file mode 100644 index 0000000..669f227 --- /dev/null +++ b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import { TAtoParteTipoSaveData } from '../../data/TAtoTipoParte/TAtoTipoParteSaveData'; + +async function executeTAtoParteTipoSaveService(data: TAtoParteTipoInterface) { + const response = await TAtoParteTipoSaveData(data); + + return response; +} + +export const TAtoParteTipoSaveService = withClientErrorHandler(executeTAtoParteTipoSaveService); \ No newline at end of file diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts new file mode 100644 index 0000000..ea9b831 --- /dev/null +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import { TCensecQualidadeDeleteData } from '../../data/TCensecQualidade/TCensecQualidadeDeleteData'; + +async function executeTCensecQualidadeDeleteService(data: TCensecQualidadeInterface) { + const response = await TCensecQualidadeDeleteData(data); + + return response; +} + +export const TCensecQualidadeDeleteService = withClientErrorHandler(executeTCensecQualidadeDeleteService); diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts new file mode 100644 index 0000000..eb37b0f --- /dev/null +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts @@ -0,0 +1,10 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TCensecQualidadeIndexData } from '../../data/TCensecQualidade/TCensecQualidadeIndexData'; + +export default async function executeTCensecQualidadeIndexService() { + const response = await TCensecQualidadeIndexData(); + + return response; +} + +export const TCensecQualidadeIndexService = withClientErrorHandler(executeTCensecQualidadeIndexService); diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts new file mode 100644 index 0000000..a667df9 --- /dev/null +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts @@ -0,0 +1,10 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import { TCensecQualidadeSaveData } from '../../data/TCensecQualidade/TCensecQualidadeSaveData'; + +async function executeTCensecQualidadeSaveService(data: TCensecQualidadeInterface) { + const response = await TCensecQualidadeSaveData(data); + return response; +} + +export const TCensecQualidadeSaveService = withClientErrorHandler(executeTCensecQualidadeSaveService); \ No newline at end of file diff --git a/src/shared/components/confirmacao/ConfirmacaoSelect.tsx b/src/shared/components/confirmacao/ConfirmacaoSelect.tsx new file mode 100644 index 0000000..8ebbdc5 --- /dev/null +++ b/src/shared/components/confirmacao/ConfirmacaoSelect.tsx @@ -0,0 +1,61 @@ +import { Button } from "@/components/ui/button"; +import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"; +import { FormControl } from "@/components/ui/form"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { cn } from "@/lib/utils"; +import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; +import { Command } from "cmdk"; +import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; +import React from "react"; + +export default function ConfirmacaoSelect({ field }: any) { + const [open, setOpen] = React.useState(false); + + const options = Object.entries(ConfirmacaoEnum).map(([value, label]) => ({ + value, + label, + })); + + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); +} diff --git a/src/shared/components/tipoDaParte/TipoDaParteSelect.tsx b/src/shared/components/tipoDaParte/TipoDaParteSelect.tsx new file mode 100644 index 0000000..74f6045 --- /dev/null +++ b/src/shared/components/tipoDaParte/TipoDaParteSelect.tsx @@ -0,0 +1,86 @@ +import { Button } from "@/components/ui/button"; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from "@/components/ui/command"; +import { FormControl } from "@/components/ui/form"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { cn } from "@/lib/utils"; +import { TipoDaParteEnum } from "@/shared/enums/TIpoDaParteEnum"; +import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; +import React from "react"; + +type TipoDaParteSelectProps = { + field: { + value?: number | null; + onChange: (value: number) => void; + }; +}; + +export default function TipoDaParteSelect({ field }: TipoDaParteSelectProps) { + const [open, setOpen] = React.useState(false); + + // Cria as opções a partir do enum + const options = Object.entries(TipoDaParteEnum).map(([key, label]) => ({ + value: Number(key), + label, + })); + + // Label exibida atualmente + const selectedLabel = + field.value !== undefined && field.value !== null + ? options.find((item) => item.value === Number(field.value))?.label + : "Selecione..."; + + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); // envia número + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); +} diff --git a/src/shared/enums/ConfirmacaoEnum.ts b/src/shared/enums/ConfirmacaoEnum.ts new file mode 100644 index 0000000..657ce66 --- /dev/null +++ b/src/shared/enums/ConfirmacaoEnum.ts @@ -0,0 +1,4 @@ +export enum ConfirmacaoEnum { + S = 'Sim', + N = 'Não', +} diff --git a/src/shared/enums/TIpoDaParteEnum.ts b/src/shared/enums/TIpoDaParteEnum.ts new file mode 100644 index 0000000..da6fea7 --- /dev/null +++ b/src/shared/enums/TIpoDaParteEnum.ts @@ -0,0 +1,8 @@ +export const TipoDaParteEnum = { + 0: 'Outorgante Rc. Outorgado', + 1: 'Outorgante', + 2: 'Outorgado', + 3: 'Auxiliar do Ato', + 4: 'Auxiliar da Parte', + 6: 'Declarante', +} as const; \ No newline at end of file From 3bd3134d33ce114181fdd1aa564824500b57eda7 Mon Sep 17 00:00:00 2001 From: keven Date: Thu, 16 Oct 2025 12:54:13 -0300 Subject: [PATCH 04/11] [MVPTN-109] feat(CRUD): Cria o CRUD de T_CENSEC_TIPONATUREZA --- .../administrativo/censec/naturezas/page.tsx | 9 + .../administrativo/censec/qualidades/page.tsx | 2 +- src/components/app-sidebar.tsx | 4 + .../TCensecTipoAto/TCensecTipoAtoSelect.tsx | 92 ++++++++ .../TCensecTipoNaturezaColumns.tsx | 97 +++++++++ .../TCensecTipoNaturezaForm.tsx | 199 ++++++++++++++++++ .../TCensecTipoNaturezaIndex.tsx | 172 +++++++++++++++ .../TCensecTipoNaturezaTable.tsx | 22 ++ .../TCensecTipoNaturezaDeleteData.ts | 18 ++ .../TCensecTipoNaturezaIndexData.ts | 14 ++ .../TCensecTipoNaturezaSaveData.ts | 26 +++ .../useTCensecTipoNaturezaDeleteHook.ts | 20 ++ .../useTCensecTipoNaturezaFormHook.ts | 13 ++ .../useTCensecTipoNaturezaIndexHook.ts | 25 +++ .../useTCensecTipoNaturezaSaveHook.ts | 33 +++ .../TCensecTipoNaturezaFormInterface.ts | 9 + .../TCensecTipoNaturezaInterface.ts | 10 + .../TCensecTipoNaturezaTableInterface.ts | 7 + .../TCensecTipoNaturezaSchema.ts | 14 ++ .../TCensecTipoNaturezaDeleteService.ts | 11 + .../TCensecTipoNaturezaIndexService.ts | 9 + .../TCensecTipoNaturezaSaveService.ts | 11 + .../tipoAtoAnterior/TipoAtoAnteriorSelect.tsx | 61 ++++++ .../tipoNatureza/TipoNaturezaSelect.tsx | 107 ++++++++++ src/shared/enums/TipoAtoAnteriorEnum.ts | 8 + src/shared/enums/TipoNaturezaEnum.ts | 6 + 26 files changed, 998 insertions(+), 1 deletion(-) create mode 100644 src/app/(protected)/(administrativo)/administrativo/censec/naturezas/page.tsx create mode 100644 src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx create mode 100644 src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx create mode 100644 src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx create mode 100644 src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex.tsx create mode 100644 src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaTable.tsx create mode 100644 src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts create mode 100644 src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData.ts create mode 100644 src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts create mode 100644 src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook.ts create mode 100644 src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface.ts create mode 100644 src/packages/administrativo/schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema.ts create mode 100644 src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts create mode 100644 src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts create mode 100644 src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts create mode 100644 src/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect.tsx create mode 100644 src/shared/components/tipoNatureza/TipoNaturezaSelect.tsx create mode 100644 src/shared/enums/TipoAtoAnteriorEnum.ts create mode 100644 src/shared/enums/TipoNaturezaEnum.ts diff --git a/src/app/(protected)/(administrativo)/administrativo/censec/naturezas/page.tsx b/src/app/(protected)/(administrativo)/administrativo/censec/naturezas/page.tsx new file mode 100644 index 0000000..e77066d --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/censec/naturezas/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import TCensecTipoNaturezaIndex from "@/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex"; + +export default function TCensecTipoNaturezaPage() { + return ( + < TCensecTipoNaturezaIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/censec/qualidades/page.tsx b/src/app/(protected)/(administrativo)/administrativo/censec/qualidades/page.tsx index 234dcb3..94b9d04 100644 --- a/src/app/(protected)/(administrativo)/administrativo/censec/qualidades/page.tsx +++ b/src/app/(protected)/(administrativo)/administrativo/censec/qualidades/page.tsx @@ -2,7 +2,7 @@ import TCensecQualidadeIndex from "@/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex"; -export default function TImovelRuralPage() { +export default function TCensecQualidadePage() { return ( < TCensecQualidadeIndex /> ); diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 60b7305..7d7d275 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -137,6 +137,10 @@ const data = { title: "Censec/Qualidades", url: "/administrativo/censec/qualidades" }, + { + title: "Censec/Qualidades", + url: "/administrativo/censec/naturezas" + }, { title: 'Censec/Centrais', url: '/cadastros/censec/', diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx new file mode 100644 index 0000000..bcf5ab6 --- /dev/null +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx @@ -0,0 +1,92 @@ +'use client'; + +import React from "react"; +import { Button } from "@/components/ui/button"; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from "@/components/ui/command"; +import { FormControl } from "@/components/ui/form"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { cn } from "@/lib/utils"; +import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; +import GetCapitalize from "@/shared/actions/text/GetCapitalize"; +import { useTCensecTipoAtoReadHook } from "@/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook"; + +export default function TCensecTipoAtoSelect({ field }: any) { + const [open, setOpen] = React.useState(false); + const [isLoading, setIsLoading] = React.useState(false); + const { tCensecTipoAto, fetchTCensecTipoAto } = useTCensecTipoAtoReadHook(); + // Busca os dados uma única vez ao montar + React.useEffect(() => { + const loadData = async () => { + if (!tCensecTipoAto.length) { + setIsLoading(true); + await fetchTCensecTipoAto(); + setIsLoading(false); + } + }; + loadData(); + }, []); + const selected = tCensecTipoAto.find( + (item) => String(item.censec_tipoato_id) === String(field.value) + ); + return ( + + + + + + + + + + + + {isLoading ? "Carregando..." : "Nenhum resultado encontrado."} + + + {tCensecTipoAto?.map((item) => ( + { + field.onChange(Number(item.censec_tipoato_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + ); +} diff --git a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx new file mode 100644 index 0000000..c01df6f --- /dev/null +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx @@ -0,0 +1,97 @@ +import { ColumnDef } from "@tanstack/react-table"; +import TCensecTipoNaturezaInterface from "../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface"; +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 GetCapitalize from "@/shared/actions/text/GetCapitalize"; +import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; +import { TipoAtoAnteriorEnum } from "@/shared/enums/TipoAtoAnteriorEnum"; + +export default function TCensecTipoNaturezaColumns( + onEdit: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void +): ColumnDef[] { + return [ + // ID + { + accessorKey: "censec_tiponatureza_id", + header: ({ column }) => SortableHeader("#", column), + cell: ({ row }) => Number(row.getValue("censec_tiponatureza_id")), + enableSorting: false, + }, + // descricao + { + accessorKey: "descricao", + header: ({ column }) => SortableHeader("Descrição", column), + cell: ({ row }) => GetCapitalize(row.getValue("descricao")), + }, + // possui_ato_anterior + { + accessorKey: "possui_ato_anterior", + header: ({ column }) => SortableHeader("Possui Ato Anterior", column), + cell: ({ row }) => { + const value = row.getValue("possui_ato_anterior") as keyof typeof ConfirmacaoEnum; + return ConfirmacaoEnum[value] ?? "-"; + }, + }, + // situacao_ato_anterior + { + accessorKey: "situacao_ato_anterior", + header: ({ column }) => SortableHeader("Situação Ato Anterior", column), + cell: ({ row }) => { + const value = Number(row.getValue("situacao_ato_anterior")); + const label = Object.prototype.hasOwnProperty.call(TipoAtoAnteriorEnum, value) + ? TipoAtoAnteriorEnum[value as keyof typeof TipoAtoAnteriorEnum] + : "-"; + return label; + }, + }, + // 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/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx new file mode 100644 index 0000000..cc746c6 --- /dev/null +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx @@ -0,0 +1,199 @@ +'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 { useTCensecTipoNaturezaFormHook } from '../../hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook'; +import { TCensecTipoNaturezaFormInterface } from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface'; +import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; +import TCensecTipoAtoSelect from '../TCensecTipoAto/TCensecTipoAtoSelect'; +import ConfirmacaoSelect from '@/shared/components/confirmacao/ConfirmacaoSelect'; +import TipoAtoAnteriorSelect from '@/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect'; +import TipoNaturezaSelect from '@/shared/components/tipoNatureza/TipoNaturezaSelect'; + +export default function TCensecTipoNaturezaForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TCensecTipoNaturezaFormInterface) { + + // Inicializa o react-hook-form com schema zod + const form = useTCensecTipoNaturezaFormHook({}); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + + // Se existir dados, reseta o formulário com os mesmos + ResetFormIfData(form, data); + + }, [data, form]); + + function onError(error: any) { + console.log(error); + } + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + Censec tipos de natureza + + + Censec tipos de natureza + + +
+ +
+ {/* Descrição */} +
+ ( + + Descrição + + + + + + )} + /> +
+ + {/* Tipo do Ato */} +
+ ( + + Tipo do Ato + < TCensecTipoAtoSelect field={field} /> + + + )} + /> +
+ + {/* Possui Ato Anterior */} +
+ ( + + Possui Ato Anterior + + + + + + )} + /> +
+ {/* tipo_ato_anterior */} +
+ ( + + Natureza + + + + )} + /> +
+ {/* Situação */} +
+ ( + + Situação + + + + )} + /> +
+ {/* Código CENSEC */} +
+ ( + + Código CENSEC + + + + + + )} + /> +
+ {/* Código */} +
+ ( + + Código + + field.onChange(parseNumberInput(e))} /> + + + + )} + /> +
+
+ {/* Rodapé do Dialog */} + + + + + + +
+ +
+
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex.tsx new file mode 100644 index 0000000..74bed20 --- /dev/null +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex.tsx @@ -0,0 +1,172 @@ +'use client'; + +import { useEffect, useState, useCallback } from 'react'; + +import Loading from '@/shared/components/loading/loading'; + +import { useTCensecTipoNaturezaIndexHook } from '@/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook'; +import { useTCensecTipoNaturezaSaveHook } from '@/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook'; +import { useTCensecTipoNaturezaDeleteHook } from '@/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import TCensecTipoNaturezaInterface from '@/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import Header from '@/shared/components/structure/Header'; +import TCensecTipoNaturezaTable from './TCensecTipoNaturezaTable'; +import TCensecTipoNaturezaForm from './TCensecTipoNaturezaForm'; + +export default function TCensecTipoNaturezaIndex() { + + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { tCensecNaturezaTipo, indexTCensecTipoNatureza } = useTCensecTipoNaturezaIndexHook(); + const { saveTCensecTipoNatureza } = useTCensecTipoNaturezaSaveHook(); + const { deleteTCensecTipoNatureza } = useTCensecTipoNaturezaDeleteHook(); + + // Estados + const [selectedData, setSelectedData] = 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: TCensecTipoNaturezaInterface | null) => { + // Se não houver dados (criação), cria um objeto inicial com pessoa_tipo + setSelectedData(data); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedData(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TCensecTipoNaturezaInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + + // Aguarda salvar o registro + await saveTCensecTipoNatureza(formData); + + // Remove o botão em estado de loading + setButtonIsLoading(false); + + // Atualiza a lista de dados + indexTCensecTipoNatureza(); + }, + [saveTCensecTipoNatureza, indexTCensecTipoNatureza, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TCensecTipoNaturezaInterface) => { + // 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 deleteTCensecTipoNatureza(itemToDelete); + + // Atualiza a lista + await indexTCensecTipoNatureza(); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, indexTCensecTipoNatureza, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + indexTCensecTipoNatureza(); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (tCensecNaturezaTipo?.length == 0) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de andamentos */} + + {/* Modal de confirmação */} + {isConfirmOpen && ( + + )} + {/* Formulário de criação/edição */} + {isFormOpen && ( + + )} +
+ ); +} diff --git a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaTable.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaTable.tsx new file mode 100644 index 0000000..602d0a4 --- /dev/null +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaTable.tsx @@ -0,0 +1,22 @@ +'use client'; + +import { DataTable } from '@/shared/components/dataTable/DataTable'; +import TCensecTipoNaturezaColumns from './TCensecTipoNaturezaColumns'; +import TCensecTipoNaturezaTableInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface'; + +/** + * Componente principal da tabela + */ +export default function TCensecTipoNaturezaTable({ data, onEdit, onDelete }: TCensecTipoNaturezaTableInterface) { + const columns = TCensecTipoNaturezaColumns(onEdit, onDelete); + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts new file mode 100644 index 0000000..0a4d210 --- /dev/null +++ b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts @@ -0,0 +1,18 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import TCensecTipoNaturezaInterface from "../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface"; + +async function executeTCensecTipoNaturezaDeleteData(data: TCensecTipoNaturezaInterface): Promise { + + const api = new API(); + + return await api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_censec_tiponatureza/${data.censec_tiponatureza_id}` + }); + +} + +export const TCensecTipoNaturezaDeleteData = withClientErrorHandler(executeTCensecTipoNaturezaDeleteData); \ No newline at end of file diff --git a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData.ts b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData.ts new file mode 100644 index 0000000..829179f --- /dev/null +++ b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData.ts @@ -0,0 +1,14 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; + +async function executeTCensecTipoNaturezaIndexData(): Promise { + const api = new API(); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/t_censec_tiponatureza` + }); +} + +export const TCensecTipoNaturezaIndexData = withClientErrorHandler(executeTCensecTipoNaturezaIndexData); \ No newline at end of file diff --git a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts new file mode 100644 index 0000000..cfa9cd2 --- /dev/null +++ b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts @@ -0,0 +1,26 @@ +import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import TCensecTipoNaturezaInterface from "../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface"; +import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import API from "@/shared/services/api/Api"; +import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; + +async function executeTCensecTipoNaturezaSaveData(data: TCensecTipoNaturezaInterface): Promise { + + console.log('executeTCensecTipoNaturezaSaveData', data) + + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.censec_tiponatureza_id); + + // Instancia o cliente da API para enviar a requisição + const api = new API(); + + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_censec_tiponatureza/${data.censec_tiponatureza_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); + +} + +export const TCensecTipoNaturezaSaveData = withClientErrorHandler(executeTCensecTipoNaturezaSaveData); \ No newline at end of file diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook.ts new file mode 100644 index 0000000..f30e164 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook.ts @@ -0,0 +1,20 @@ +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import { TCensecTipoNaturezaDeleteService } from '../../services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService'; + +export const useTCensecTipoNaturezaDeleteHook = () => { + const { setResponse } = useResponse(); + + const [tAtoParteTipo, setTCensecTipoNatureza] = useState(); + + const deleteTCensecTipoNatureza = async (data: TCensecTipoNaturezaInterface) => { + const response = await TCensecTipoNaturezaDeleteService(data); + + setTCensecTipoNatureza(data); + + setResponse(response); + }; + + return { tAtoParteTipo, deleteTCensecTipoNatureza }; +}; diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts new file mode 100644 index 0000000..75d0c83 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts @@ -0,0 +1,13 @@ +import { useForm } from "react-hook-form"; +import { TCensecTipoNaturezaFormValues, TCensecTipoNaturezaSchema } from "../../schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema"; +import { zodResolver } from "@hookform/resolvers/zod"; + +export function useTCensecTipoNaturezaFormHook(defaults?: Partial) { + return useForm({ + resolver: zodResolver(TCensecTipoNaturezaSchema), + defaultValues: { + censec_tiponatureza_id: 0, + ...defaults, + }, + }); +} \ No newline at end of file diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook.ts new file mode 100644 index 0000000..2e0f39f --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook.ts @@ -0,0 +1,25 @@ +'use client'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import { TCensecTipoNaturezaIndexService } from '../../services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService'; + +export const useTCensecTipoNaturezaIndexHook = () => { + const { setResponse } = useResponse(); + + const [tCensecNaturezaTipo, setTCensecTipoNatureza] = useState([]); + + const indexTCensecTipoNatureza = async () => { + const response = await TCensecTipoNaturezaIndexService(); + // Armazena os dados consultados + setTCensecTipoNatureza(response.data); + // Define os dados do componente de resposta (toast, modal, etc) + setResponse(response); + }; + + return { + tCensecNaturezaTipo, + indexTCensecTipoNatureza + }; +}; diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook.ts new file mode 100644 index 0000000..fae2805 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook.ts @@ -0,0 +1,33 @@ +'use client'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import { TCensecTipoNaturezaSaveService } from '../../services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService'; + +export const useTCensecTipoNaturezaSaveHook = () => { + const { setResponse } = useResponse(); + + const [tAtoParteTipo, setTCensecTipoNatureza] = useState(); + + // controla se o formulário está aberto ou fechado + const [isOpen, setIsOpen] = useState(false); + + const saveTCensecTipoNatureza = async (data: TCensecTipoNaturezaInterface) => { + const response = await TCensecTipoNaturezaSaveService(data); + + // Armazena os dados da repsota + setTCensecTipoNatureza(response.data); + + // Define os dados da respota(toast, modal, etc) + setResponse(response); + + // Fecha o formulário automaticamente após salvar + setIsOpen(false); + + // Retorna os valores de forma imediata + return response.data; + }; + + return { tAtoParteTipo, saveTCensecTipoNatureza }; +}; diff --git a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface.ts b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface.ts new file mode 100644 index 0000000..19f59c7 --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface.ts @@ -0,0 +1,9 @@ +import { TCensecTipoNaturezaFormValues } from "../../schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema"; + +export interface TCensecTipoNaturezaFormInterface { + isOpen: boolean; + data: TCensecTipoNaturezaFormValues | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: TCensecTipoNaturezaFormValues) => void; + buttonIsLoading: boolean; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface.ts b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface.ts new file mode 100644 index 0000000..6837b49 --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface.ts @@ -0,0 +1,10 @@ +export default interface TCensecTipoNaturezaInterface { + censec_tiponatureza_id?: number; + censec_tipoato_id?: number; + descricao?: string; + possui_ato_anterior?: string; + codigo?: number; + obrigatorio?: string; + tipo_ato_anterior?: string; + situacao_ato_anterior?: string; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface.ts b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface.ts new file mode 100644 index 0000000..b241f15 --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface.ts @@ -0,0 +1,7 @@ +import TCensecTipoNaturezaInterface from "./TCensecTipoNaturezaInterface"; + +export default interface TCensecTipoNaturezaTableInterface { + data?: TCensecTipoNaturezaInterface[]; + onEdit: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void; +} \ No newline at end of file diff --git a/src/packages/administrativo/schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema.ts b/src/packages/administrativo/schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema.ts new file mode 100644 index 0000000..13ce350 --- /dev/null +++ b/src/packages/administrativo/schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema.ts @@ -0,0 +1,14 @@ +import z from "zod"; + +export const TCensecTipoNaturezaSchema = z.object({ + censec_tiponatureza_id: z.number().optional(), + censec_tipoato_id: z.number().optional(), + descricao: z.string().optional(), + possui_ato_anterior: z.string().optional(), + codigo: z.number().optional(), + obrigatorio: z.string().optional(), + tipo_ato_anterior: z.string().optional(), + situacao_ato_anterior: z.string().optional(), +}); + +export type TCensecTipoNaturezaFormValues = z.infer; \ No newline at end of file diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts new file mode 100644 index 0000000..52e3665 --- /dev/null +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import { TCensecTipoNaturezaDeleteData } from '../../data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData'; + +async function executeTCensecTipoNaturezaDeleteService(data: TCensecTipoNaturezaInterface) { + const response = await TCensecTipoNaturezaDeleteData(data); + + return response; +} + +export const TCensecTipoNaturezaDeleteService = withClientErrorHandler(executeTCensecTipoNaturezaDeleteService); diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts new file mode 100644 index 0000000..1a4ce87 --- /dev/null +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts @@ -0,0 +1,9 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TCensecTipoNaturezaIndexData } from '../../data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData'; + +export default async function executeTCensecTipoNaturezaIndexService() { + const response = await TCensecTipoNaturezaIndexData(); + return response; +} + +export const TCensecTipoNaturezaIndexService = withClientErrorHandler(executeTCensecTipoNaturezaIndexService); diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts new file mode 100644 index 0000000..02689f1 --- /dev/null +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import { TCensecTipoNaturezaSaveData } from '../../data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData'; + +async function executeTCensecTipoNaturezaSaveService(data: TCensecTipoNaturezaInterface) { + const response = await TCensecTipoNaturezaSaveData(data); + + return response; +} + +export const TCensecTipoNaturezaSaveService = withClientErrorHandler(executeTCensecTipoNaturezaSaveService); \ No newline at end of file diff --git a/src/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect.tsx b/src/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect.tsx new file mode 100644 index 0000000..3370a9b --- /dev/null +++ b/src/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect.tsx @@ -0,0 +1,61 @@ +import { Button } from "@/components/ui/button"; +import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"; +import { FormControl } from "@/components/ui/form"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { cn } from "@/lib/utils"; +import { TipoAtoAnteriorEnum } from "@/shared/enums/TipoAtoAnteriorEnum"; +import { Command } from "cmdk"; +import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; +import React from "react"; + +export default function TipoAtoAnteriorSelect({ field }: any) { + const [open, setOpen] = React.useState(false); + + const options = Object.entries(TipoAtoAnteriorEnum).map(([value, label]) => ({ + value, + label, + })); + + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); +} diff --git a/src/shared/components/tipoNatureza/TipoNaturezaSelect.tsx b/src/shared/components/tipoNatureza/TipoNaturezaSelect.tsx new file mode 100644 index 0000000..f848f5e --- /dev/null +++ b/src/shared/components/tipoNatureza/TipoNaturezaSelect.tsx @@ -0,0 +1,107 @@ +import { Button } from "@/components/ui/button"; +import { + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from "@/components/ui/command"; +import { FormControl } from "@/components/ui/form"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { cn } from "@/lib/utils"; +import { TipoNaturezaEnum } from "@/shared/enums/TipoNaturezaEnum"; +import { Command } from "cmdk"; +import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; +import React from "react"; + +export default function TipoNaturezaSelect({ field }: any) { + const [open, setOpen] = React.useState(false); + + // Gera opções a partir do Enum + const options = Object.entries(TipoNaturezaEnum).map(([id, label]) => ({ + value: Number(id), + label, + })); + + // 🔹 Converte valor recebido (string tipo ";0,1,2,3") para array de números + const parseToArray = (value: any): number[] => { + if (!value) return []; + if (Array.isArray(value)) return value.map(Number); + if (typeof value === "string") { + return value + .replace(/^;/, "") // remove o primeiro ";" + .split(",") + .filter(Boolean) + .map((v) => Number(v.trim())); + } + return []; + }; + + // Array de valores selecionados + const selectedValues: number[] = parseToArray(field.value); + + // Atualiza valor selecionado (e reenvia como string ";0,1,2,3") + const toggleSelect = (value: number) => { + let newValues; + if (selectedValues.includes(value)) { + newValues = selectedValues.filter((v) => v !== value); + } else { + newValues = [...selectedValues, value]; + } + // Converte para formato ";0,1,2,3" + const formatted = ";" + newValues.join(","); + field.onChange(formatted); + }; + + // Label do botão (nomes selecionados) + const selectedLabels = options + .filter((opt) => selectedValues.includes(opt.value)) + .map((opt) => opt.label) + .join(", "); + + return ( + + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + toggleSelect(item.value)} + > + + {item.label} + + ))} + + + + + + ); +} diff --git a/src/shared/enums/TipoAtoAnteriorEnum.ts b/src/shared/enums/TipoAtoAnteriorEnum.ts new file mode 100644 index 0000000..68e0946 --- /dev/null +++ b/src/shared/enums/TipoAtoAnteriorEnum.ts @@ -0,0 +1,8 @@ +export const TipoAtoAnteriorEnum = { + 1: 'Substabelecido', + 2: 'Revogado', + 3: 'Reratificado', + 4: 'Renunciado', + 5: 'Renúncia', + 6: 'Renúncia Parcial' +} as const; \ No newline at end of file diff --git a/src/shared/enums/TipoNaturezaEnum.ts b/src/shared/enums/TipoNaturezaEnum.ts new file mode 100644 index 0000000..d6cb0a0 --- /dev/null +++ b/src/shared/enums/TipoNaturezaEnum.ts @@ -0,0 +1,6 @@ +export const TipoNaturezaEnum = { + 1: 'Escritura', + 2: 'Procuração', + 3: 'Substabelecimento', + 4: 'Testamento', +} as const; \ No newline at end of file From b48ffc4bd54d2622976ed25088b55f7a53e7b787 Mon Sep 17 00:00:00 2001 From: keven Date: Fri, 17 Oct 2025 09:04:27 -0300 Subject: [PATCH 05/11] [MVPTN-120] feat(CRUD): Cria o Crud de Vincular as qualidades ao ato --- .../t_censec_tipoato/TCensecTipoAtoForm.tsx | 292 ++++++++++-------- src/components/app-sidebar.tsx | 4 - .../TCensecQualidadeAtoColumns.tsx | 64 ++++ .../TCensecQualidadeAtoForm.tsx | 114 +++++++ .../TCensecQualidadeAtoFormColumns.tsx | 60 ++++ .../TCensecQualidadeAtoIndex.tsx | 165 ++++++++++ .../TCensecQualidadeAtoTable.tsx | 31 ++ .../TCensecQualidadeAtoIndexData.ts | 14 + .../TCensecQualidadeAtoRemoveData.ts | 14 + .../TCensecQualidadeAtoSaveData.ts | 19 ++ .../useTCensecQualidadeAtoDeleteHook.ts | 15 + .../useTCensecQualidadeAtoFormHook.ts | 15 + .../useTCensecQualidadeAtoIndexHook.ts | 21 ++ .../useTCensecQualidadeAtoSaveHook.ts | 33 ++ .../TCensecQualidadeAtoFormInterface.ts | 9 + .../TCensecQualidadeAtoInterface.ts | 6 + .../TCensecQualidadeAtoJoinedInterface.ts | 5 + .../TCensecQualidadeAtoPageInterface.ts | 3 + .../TCensecQualidadeAtoTableInterface.ts | 7 + .../TCensecQualidadeAtoSchema.ts | 10 + .../TCensecQualidadeAtoIndexService.ts | 11 + .../TCensecQualidadeAtoRemoveService.ts | 13 + .../TCensecQualidadeAtoSaveService.ts | 12 + 23 files changed, 804 insertions(+), 133 deletions(-) create mode 100644 src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx create mode 100644 src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoTable.tsx create mode 100644 src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts create mode 100644 src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts create mode 100644 src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts create mode 100644 src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts create mode 100644 src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook.ts create mode 100644 src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoJoinedInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface.ts create mode 100644 src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface.ts create mode 100644 src/packages/administrativo/schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema.ts create mode 100644 src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts create mode 100644 src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts create mode 100644 src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx index 8f326f9..45aec36 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx @@ -4,7 +4,6 @@ import z from "zod"; import { useEffect } from "react"; import { useForm, Controller } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; -import { Checkbox } from "@/components/ui/checkbox"; import LoadingButton from "@/shared/components/loadingButton/LoadingButton"; import { Button } from "@/components/ui/button"; import { @@ -26,11 +25,13 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; -import { Label } from "@/components/ui/label"; import { TCensecTipoAtoSchema } from "../../_schemas/TCensecTipoAtoSchema"; import TCensecInterface from "../../_interfaces/TCensecInterface"; import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; import SituacoesSelect from "@/shared/components/situacoes/SituacoesSelect"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { IdCardIcon, UserIcon } from "lucide-react"; +import TCensecQualidadeAtoIndex from "@/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex"; type FormValues = z.infer; @@ -51,7 +52,7 @@ export default function TCensecTipoAtoForm({ onSave, buttonIsLoading }: TCensecTipoAtoFormProps) { - // react-hook-form com schema Zod + const form = useForm({ resolver: zodResolver(TCensecTipoAtoSchema), defaultValues: { @@ -65,7 +66,6 @@ export default function TCensecTipoAtoForm({ }, }); - // Atualiza o formulário se houver dados para edição useEffect(() => { if (data) form.reset(data); }, [data, form]); @@ -77,7 +77,7 @@ export default function TCensecTipoAtoForm({ if (!open) onClose(null, false); }} > - + Tipo de Ato CENSEC @@ -85,138 +85,172 @@ export default function TCensecTipoAtoForm({ -
- + {/* Conteúdo principal dentro das Tabs */} + + + + + Dados Gerais + + {data?.censec_tipoato_id && ( + + + Qualidades + + )} + - {/* Descrição */} - ( - - Descrição - - - - - - )} - /> +
+ {/* ABA DADOS GERAIS */} + + + - {/* Select Censec */} - ( - - Central do Censec - - - - )} - /> + {/* Descrição */} + ( + + Descrição + + + + + + )} + /> + {/* Select Censec */} + ( + + Central do Censec + + + + )} + /> - {/* Situação */} - ( -
- - -
- )} - /> + {/* Situação */} + ( + + Situação + + + + + + )} + /> - {/* Tipo de Separação */} - ( - - Tipo de Separação - - - - )} - /> + {/* Tipo de Separação */} + ( + + Tipo de Separação + + + + )} + /> - {/* Tipo de Revogação */} - ( - - Tipo de Revogação - - - - )} - /> + {/* Tipo de Revogação */} + ( + + Tipo de Revogação + + + + )} + /> - {/* Rodapé */} - - - - - - + {/* Rodapé do formulário */} + + + + + + - {/* Campos ocultos */} - - - - + {/* Campos ocultos */} + + + + +
+ + {/* ======== ABA QUALIDADES ======== */} + {data?.censec_tipoato_id && ( + + + + )} +
+
); diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 7d7d275..60b7305 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -137,10 +137,6 @@ const data = { title: "Censec/Qualidades", url: "/administrativo/censec/qualidades" }, - { - title: "Censec/Qualidades", - url: "/administrativo/censec/naturezas" - }, { title: 'Censec/Centrais', url: '/cadastros/censec/', diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx new file mode 100644 index 0000000..db02c75 --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx @@ -0,0 +1,64 @@ +import { ColumnDef } from "@tanstack/react-table"; +import { Button } from "@/components/ui/button"; +import { ArrowUpDownIcon, EllipsisIcon, Trash2Icon } from "lucide-react"; +import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; +import GetCapitalize from "@/shared/actions/text/GetCapitalize"; +import { SortableHeader } from "@/shared/components/dataTable/SortableHeader"; +import TCensecQualidadeAtoJoinedInterface from "../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface"; + +export default function TCensecQualidadeAtoColumns( + onDelete: (item: TCensecQualidadeAtoJoinedInterface, isEditingFormStatus: boolean) => void, +): ColumnDef[] { + return [ + // ID + { + accessorKey: 'censec_qualidadeato_id', + header: ({ column }) => ( + + ), + cell: ({ row }) => Number(row.getValue('censec_qualidadeato_id')), + enableSorting: false, + }, + // Descrição + { + accessorKey: "tcq_descricao", + header: ({ column }) => SortableHeader("Descrição", column), + cell: ({ row }) => GetCapitalize(row.getValue("tcq_descricao")), + }, + // Ações + { + id: 'actions', + header: 'Ações', + cell: ({ row }) => { + const pessoa = row.original; + return ( + + + + + + + onDelete(pessoa, true)} + > + + Remover + + + + + ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; +} \ No newline at end of file diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx new file mode 100644 index 0000000..2036941 --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx @@ -0,0 +1,114 @@ +'use client'; + +import React, { useEffect, useState } from 'react'; + +import { Button } from '@/components/ui/button'; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog'; +import { Form } from '@/components/ui/form'; + +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { DataTable } from '@/shared/components/dataTable/DataTable'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import { useTCensecQualidadeAtoFormHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook'; +import TCensecQualidadeAtoFormInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface'; +import { useTCensecQualidadeIndexHook } from '../../hooks/TCensecQualidade/useTCensecQualidadeIndexHook'; +import TCensecQualidadeAtoFormColumns from './TCensecQualidadeAtoFormColumns'; + +export default function TCensecQualidadeAtoForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: TCensecQualidadeAtoFormInterface) { + + const { tCensecQualidade, indexTCensecQualidade } = useTCensecQualidadeIndexHook(); + + const [selectedTCensecQualidadeAto, setSelectedTCensecQualidadeAto] = useState(null); + + // Inicializa o react-hook-form com schema zod + const form = useTCensecQualidadeAtoFormHook(); + + // Atualiza o formulário quando recebe dados para edição + useEffect(() => { + const loadData = async () => { + ResetFormIfData(form, data); + await indexTCensecQualidade(); + }; + loadData(); + }, [data, form]); + + useEffect(() => { + const newValue = selectedTCensecQualidadeAto?.censec_qualidade_id ?? 0; + const currentValue = form.getValues('censec_qualidade_id'); + if (currentValue !== newValue) { + form.setValue('censec_qualidade_id', newValue); + } + }, [selectedTCensecQualidadeAto, form]); + + const columns = TCensecQualidadeAtoFormColumns(setSelectedTCensecQualidadeAto); + + function onError(error: any) { + console.log(error); + } + + return ( + { + if (!open) onClose(null, false); + }} + > + + + + Qualidades + + + Qualidades vinculadas + + +
+ +
+ +
+ {/* Rodapé do Dialog */} + + + + + + +
+ +
+
+ ); +} diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx new file mode 100644 index 0000000..807b1fc --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx @@ -0,0 +1,60 @@ +import { ColumnDef } from "@tanstack/react-table"; +import { Checkbox } from "@/components/ui/checkbox"; +import { Button } from "@/components/ui/button"; +import { ArrowUpDownIcon } from "lucide-react"; +import TCensecQualidadeAtoInterface from "../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface"; +import TCensecQualidadeInterface from "../../interfaces/TCensecQualidade/TCensecQualidadeInterface"; +import GetCapitalize from "@/shared/actions/text/GetCapitalize"; + +export default function TCensecQualidadeAtoFormColumns( + setSelectedTCensecQualidadeAto: React.Dispatch>, +): ColumnDef[] { + return [ + { + id: 'select', + header: '', + cell: ({ row, table }) => ( + { + // Limpa todas as seleções antes de selecionar uma nova + table.resetRowSelection(); + row.toggleSelected(!!value); + setSelectedTCensecQualidadeAto(value ? row.original : null); + }} + aria-label="Select row" + /> + ), + enableSorting: false, + enableHiding: false, + }, + // ID + { + accessorKey: 'censec_qualidade_id', + header: ({ column }) => ( + + ), + cell: ({ row }) => Number(row.getValue('censec_qualidade_id')), + enableSorting: true, + }, + // ID + { + accessorKey: 'descricao', + header: ({ column }) => ( + + ), + cell: ({ row }) => GetCapitalize(row.getValue('descricao')), + enableSorting: true, + }, + ]; +} \ No newline at end of file diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx new file mode 100644 index 0000000..72334aa --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx @@ -0,0 +1,165 @@ +'use client'; + +import React, { useEffect, useState, useCallback } from 'react'; + +import { useTCensecQualidadeAtoIndexHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook'; +import { useTCensecQualidadeAtoSaveHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook'; +import { useTCensecQualidadeAtoDeleteHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import TCensecQualidadeAtoTable from './TCensecQualidadeAtoTable'; +import Header from '@/shared/components/structure/Header'; +import TCensecQualidadeAtoForm from './TCensecQualidadeAtoForm'; +import TCensecQualidadeAtoPageInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; + +export default function TCensecQualidadeAtoIndex({ censec_tipoato_id }: TCensecQualidadeAtoPageInterface) { + + const TCensecQualidadeAtoPage: TCensecQualidadeAtoPageInterface = { + censec_tipoato_id: censec_tipoato_id + } + + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); + + // Hooks para leitura e salvamento + const { tPessoaRepresentante, fetchTCensecQualidadeAto } = useTCensecQualidadeAtoIndexHook(); + const { saveTCensecQualidadeAto } = useTCensecQualidadeAtoSaveHook(); + const { removeTPessaoRepresentante } = useTCensecQualidadeAtoDeleteHook(); + + // Estados + const [selectedData, setSelectedData] = 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, + handleCancel, + } = useConfirmDialog(); + + /** + * Abre o formulário no modo de edição ou criação + */ + const handleOpenForm = useCallback((data: TCensecQualidadeAtoInterface | null) => { + // Se não houver dados (criação), cria um objeto inicial com imovel_id + const initialData: TCensecQualidadeAtoPageInterface = data ?? { censec_tipoato_id } as TCensecQualidadeAtoPageInterface; + setSelectedData(initialData); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedData(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TCensecQualidadeAtoInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); + // Aguarda salvar o registro + await saveTCensecQualidadeAto(formData); + // Remove o botão em estado de loading + setButtonIsLoading(false); + // Atualiza a lista de dados + fetchTCensecQualidadeAto(TCensecQualidadeAtoPage); + }, + [saveTCensecQualidadeAto, fetchTCensecQualidadeAto, handleCloseForm], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TCensecQualidadeAtoInterface) => { + // 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 removeTPessaoRepresentante(itemToDelete); + + // Atualiza a lista + await fetchTCensecQualidadeAto(TCensecQualidadeAtoPage); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, fetchTCensecQualidadeAto, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + fetchTCensecQualidadeAto(TCensecQualidadeAtoPage); + }, []); + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de Registros */} + + {/* Modal de confirmação */} + {isConfirmOpen && ( + + )} + {/* Formulário de criação/edição */} + {isFormOpen && ( + + )} +
+ ); +} diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoTable.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoTable.tsx new file mode 100644 index 0000000..2da9cd7 --- /dev/null +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoTable.tsx @@ -0,0 +1,31 @@ +'use client'; + +import { DataTable } from '@/shared/components/dataTable/DataTable'; + +import TCensecQualidadeAtoColumns from './TCensecQualidadeAtoColumns'; +import TCensecQualidadeAtoTableInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface'; + +/** + * Componente principal da tabela + */ +export default function TCensecQualidadeAtoTable({ + data, + onDelete, +}: TCensecQualidadeAtoTableInterface) { + const columns = TCensecQualidadeAtoColumns(onDelete); + const isEmpty = !data || data.length === 0; + return ( +
+ {isEmpty ? ( +
+ Nenhuma unidade cadastrada ainda. +
+ ) : ( + + )} +
+ ); +} diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts new file mode 100644 index 0000000..7c4ce23 --- /dev/null +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts @@ -0,0 +1,14 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; + +async function executeTCensecQualidadeAtoIndexData(data: TCensecQualidadeAtoInterface) { + const api = new API(); + return await api.send({ + method: Methods.GET, + endpoint: `administrativo/t_censec_qualidadeato/tipo-ato/${data.censec_tipoato_id}`, + }); +} + +export const TCensecQualidadeAtoIndexData = withClientErrorHandler(executeTCensecQualidadeAtoIndexData); \ No newline at end of file diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts new file mode 100644 index 0000000..bc2ea01 --- /dev/null +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts @@ -0,0 +1,14 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; + +async function executeTCensecQualidadeAtoRemoveData(data: TCensecQualidadeAtoInterface) { + const api = new API(); + return api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_censec_qualidadeato/${data.censec_qualidadeato_id}`, + }); +} + +export const TCensecQualidadeAtoRemoveData = withClientErrorHandler(executeTCensecQualidadeAtoRemoveData); diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts new file mode 100644 index 0000000..e4f4bd4 --- /dev/null +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts @@ -0,0 +1,19 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; + +async function executeTCensecQualidadeAtoSaveData(data: TCensecQualidadeAtoInterface) { + + // Instancia o cliente da API para enviar a requisição + const api = new API(); + + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: Methods.POST, + endpoint: `administrativo/t_censec_qualidadeato/`, // endpoint dinâmico + body: data, + }); +} + +export const TCensecQualidadeAtoSaveData = withClientErrorHandler(executeTCensecQualidadeAtoSaveData); diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook.ts new file mode 100644 index 0000000..57f49e1 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook.ts @@ -0,0 +1,15 @@ +import { useResponse } from '@/shared/components/response/ResponseContext'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import { TCensecQualidadeAtoRemoveService } from '../../services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService'; + +export const useTCensecQualidadeAtoDeleteHook = () => { + const { setResponse } = useResponse(); + + const removeTPessaoRepresentante = async (data: TCensecQualidadeAtoInterface) => { + const response = await TCensecQualidadeAtoRemoveService(data); + + setResponse(response); + }; + + return { removeTPessaoRepresentante }; +}; diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts new file mode 100644 index 0000000..bcb1032 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts @@ -0,0 +1,15 @@ +// hooks/useTPessoaForm.ts +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import TCensecQualidadeAtoInterface from "../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface"; +import { TCensecQualidadeAtoFormValues, TCensecQualidadeAtoSchema } from "../../schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema"; + +// Hook customizado +export function useTCensecQualidadeAtoFormHook(defaults?: Partial) { + return useForm({ + resolver: zodResolver(TCensecQualidadeAtoSchema), + defaultValues: { + ...defaults, + }, + }); +} \ No newline at end of file diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts new file mode 100644 index 0000000..cfa480d --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts @@ -0,0 +1,21 @@ +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import { TCensecQualidadeAtoIndexService } from '../../services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService'; + +export const useTCensecQualidadeAtoIndexHook = () => { + const { setResponse } = useResponse(); + + const [tPessoaRepresentante, setTCensecQualidadeAto] = useState([]); + + const fetchTCensecQualidadeAto = async (data: TCensecQualidadeAtoInterface) => { + + const response = await TCensecQualidadeAtoIndexService(data); + + setTCensecQualidadeAto(response.data); + + setResponse(response); + }; + + return { tPessoaRepresentante, fetchTCensecQualidadeAto }; +}; diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook.ts new file mode 100644 index 0000000..61724a3 --- /dev/null +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook.ts @@ -0,0 +1,33 @@ +'use client'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import { TCensecQualidadeAtoSaveService } from '../../services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService'; + +export const useTCensecQualidadeAtoSaveHook = () => { + const { setResponse } = useResponse(); + + const [tPessoaRepresentante, setTCensecQualidadeAto] = useState(); + + // controla se o formulário está aberto ou fechado + const [isOpen, setIsOpen] = useState(false); + + const saveTCensecQualidadeAto = async (data: TCensecQualidadeAtoInterface) => { + const response = await TCensecQualidadeAtoSaveService(data); + + // Armazena os dados da repsota + setTCensecQualidadeAto(response.data); + + // Define os dados da respota(toast, modal, etc) + setResponse(response); + + // Fecha o formulário automaticamente após salvar + setIsOpen(false); + + // Retorna os valores de forma imediata + return response.data; + }; + + return { tPessoaRepresentante, saveTCensecQualidadeAto }; +}; diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface.ts new file mode 100644 index 0000000..77690d7 --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface.ts @@ -0,0 +1,9 @@ +import { TCensecQualidadeAtoFormValues } from "../../schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema"; + +export default interface TCensecQualidadeAtoFormInterface { + isOpen: boolean; + data: TCensecQualidadeAtoFormValues | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: TCensecQualidadeAtoFormValues) => void; + buttonIsLoading: boolean; +} diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface.ts new file mode 100644 index 0000000..e6a742f --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface.ts @@ -0,0 +1,6 @@ +export default interface TCensecQualidadeAtoInterface { + censec_qualidadeato_id?: number; + censec_tipoato_id?: number; + censec_qualidade_id?: number; + qtd_minima?: number; +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoJoinedInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoJoinedInterface.ts new file mode 100644 index 0000000..589f6fe --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoJoinedInterface.ts @@ -0,0 +1,5 @@ +import TCensecQualidadeAtoInterface from "./TCensecQualidadeAtoInterface"; + +export default interface TCensecQualidadeAtoJoinedInterface extends TCensecQualidadeAtoInterface { + tcq_descricao?: string +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface.ts new file mode 100644 index 0000000..8229335 --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface.ts @@ -0,0 +1,3 @@ +export default interface TCensecQualidadeAtoJoinedInterface { + censec_tipoato_id?: number +} \ No newline at end of file diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface.ts new file mode 100644 index 0000000..37cd152 --- /dev/null +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface.ts @@ -0,0 +1,7 @@ +import TCensecQualidadeAtoJoinedInterface from "./TCensecQualidadeAtoPageInterface"; + +export default interface TCensecQualidadeAtoTableInterface { + data: TCensecQualidadeAtoJoinedInterface[]; + onEdit: (item: TCensecQualidadeAtoJoinedInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TCensecQualidadeAtoJoinedInterface, isEditingFormStatus: boolean) => void; +} \ No newline at end of file diff --git a/src/packages/administrativo/schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema.ts b/src/packages/administrativo/schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema.ts new file mode 100644 index 0000000..be1ccff --- /dev/null +++ b/src/packages/administrativo/schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema.ts @@ -0,0 +1,10 @@ +import z from "zod"; + +export const TCensecQualidadeAtoSchema = z.object({ + censec_qualidadeato_id: z.number().optional(), + censec_tipoato_id: z.number().optional(), + censec_qualidade_id: z.number().optional(), + qtd_minima: z.number().optional(), +}); + +export type TCensecQualidadeAtoFormValues = z.infer; \ No newline at end of file diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts new file mode 100644 index 0000000..e78265e --- /dev/null +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts @@ -0,0 +1,11 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TCensecQualidadeAtoIndexData } from '../../data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; + +async function executeTCensecQualidadeAtoIndexService(data: TCensecQualidadeAtoInterface) { + return await TCensecQualidadeAtoIndexData(data); +} + +export const TCensecQualidadeAtoIndexService = withClientErrorHandler( + executeTCensecQualidadeAtoIndexService +); \ No newline at end of file diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts new file mode 100644 index 0000000..1c2cad2 --- /dev/null +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts @@ -0,0 +1,13 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TCensecQualidadeAtoRemoveData } from '../../data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; + +async function executeTCensecQualidadeAtoRemoveService(data: TCensecQualidadeAtoInterface) { + const response = TCensecQualidadeAtoRemoveData(data); + + return response; +} + +export const TCensecQualidadeAtoRemoveService = withClientErrorHandler( + executeTCensecQualidadeAtoRemoveService +); diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts new file mode 100644 index 0000000..266db27 --- /dev/null +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts @@ -0,0 +1,12 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TCensecQualidadeAtoSaveData } from '../../data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; + +async function executeTCensecQualidadeAtoSaveService(data: TCensecQualidadeAtoInterface) { + const response = await TCensecQualidadeAtoSaveData(data); + return response; +} + +export const TCensecQualidadeAtoSaveService = withClientErrorHandler( + executeTCensecQualidadeAtoSaveService +); From 36cbd43ee4e807b9003560d327e9fb3b3b59ae35 Mon Sep 17 00:00:00 2001 From: keven Date: Fri, 17 Oct 2025 15:02:09 -0300 Subject: [PATCH 06/11] =?UTF-8?q?[MVPTN-109]=20fix(Enum):=20Corre=C3=A7?= =?UTF-8?q?=C3=A3o=20dos=20c=C3=B3digos=20do=20ENUM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/enums/TipoAtoAnteriorEnum.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/shared/enums/TipoAtoAnteriorEnum.ts b/src/shared/enums/TipoAtoAnteriorEnum.ts index 68e0946..812688c 100644 --- a/src/shared/enums/TipoAtoAnteriorEnum.ts +++ b/src/shared/enums/TipoAtoAnteriorEnum.ts @@ -1,8 +1,8 @@ export const TipoAtoAnteriorEnum = { - 1: 'Substabelecido', - 2: 'Revogado', - 3: 'Reratificado', - 4: 'Renunciado', - 5: 'Renúncia', - 6: 'Renúncia Parcial' + 6: 'Substabelecido', + 7: 'Revogado', + 8: 'Reratificado', + 9: 'Renunciado', + 10: 'Renúncia', + 11: 'Renúncia Parcial' } as const; \ No newline at end of file From 5297d6ab2e875aab92b7c9dfb93a3042e731ff4e Mon Sep 17 00:00:00 2001 From: keven Date: Sat, 18 Oct 2025 12:23:47 -0300 Subject: [PATCH 07/11] refactor(Arch): Refatora a arquitetura de pastas do projeto --- .../usuarios/[id]/detalhes/page.tsx | 4 +- .../(g_usuario)/usuarios/formulario/page.tsx | 4 +- .../(g_usuario)/usuarios/page.tsx | 4 +- .../administrativo/andamentos/page.tsx | 9 + .../administrativo/bairros/page.tsx | 9 + .../centrais/censec/centrais/page.tsx | 9 + .../censec/naturezas-litigios/page.tsx | 9 + .../centrais/censec/qualidades/page.tsx | 9 + .../centrais/censec/tipos-atos/page.tsx | 9 + .../administrativo/cidades/page.tsx | 9 + .../imoveis/tipos-logradouros/page.tsx | 9 + .../administrativo/medidas/tipos/page.tsx | 9 + .../pessoas/estados-civis/page.tsx | 9 + .../pessoas/profissoes/page.tsx | 9 + .../pessoas/regimes-bens/page.tsx | 9 + .../pessoas/regimes-comunhao/page.tsx | 9 + .../administrativo/reconhecimentos/page.tsx | 9 + .../cadastros/(g_cidade)/cidades/page.tsx | 163 ------------ .../(t_minuta)/minuta/[id]/detalhes/page.tsx | 4 +- .../(t_minuta)/minuta/formulario/page.tsx | 4 +- .../cadastros/(t_minuta)/minuta/page.tsx | 14 +- .../t_censec_tipoato/TCensecTipoAtoTable.tsx | 127 --------- .../_data/TCensecTipoAto/mockCensecTipoAto.ts | 251 ------------------ .../GTBProfissaoRemoveService.ts | 8 - .../g_tb_profissao/GTBProfissaoSaveService.ts | 7 - .../GTBRegimeBensRemoveService.ts | 8 - .../_services/t_minuta/TMinutaIndex.ts | 7 - .../cadastros/pessoas/complementos/page.tsx | 70 ----- .../(protected)/(servicos)/servicos/page.tsx | 100 ------- src/components/app-sidebar.tsx | 46 ++-- src/components/login-form.tsx | 4 +- src/components/nav-user.tsx | 2 +- .../components/GCidade}/GCidadeForm.tsx | 12 +- .../components/GCidade/GCidadeIndex.tsx | 163 ++++++++++++ .../components/GCidade}/GCidadeTable.tsx | 2 +- .../GMedidaTipo}/GMedidaTipoForm.tsx | 4 +- .../GMedidaTipo/GMedidaTipoIndex.tsx} | 14 +- .../GMedidaTipo}/GMedidaTipoTable.tsx | 2 +- .../components/GTBBairro}/GTBBairroForm.tsx | 2 +- .../components/GTBBairro/GTBBairroIndex.tsx} | 14 +- .../components/GTBBairro/GTBBairroSelect.tsx | 4 +- .../components/GTBBairro}/GTBBairroTable.tsx | 2 +- .../GTBEstadoCivil}/GTBEstadoCivilForm.tsx | 4 +- .../GTBEstadoCivil/GTBEstadoCivilIndex.tsx} | 14 +- .../GTBEstadoCivil}/GTBEstadoCivilTable.tsx | 2 +- .../GTBProfissao}/GTBProfissaoForm.tsx | 2 +- .../GTBProfissao/GTBProfissaoIndex.tsx} | 14 +- .../GTBProfissao}/GTBProfissaoTable.tsx | 2 +- .../GTBRegimeBens}/GTBRegimeBensForm.tsx | 2 +- .../GTBRegimeBens/GTBRegimeBensIndex.tsx} | 14 +- .../GTBRegimeBens}/GTBRegimeBensTable.tsx | 2 +- .../GTBRegimeComunhaoForm.tsx | 4 +- .../GTBRegimeComunhaoIndex.tsx} | 14 +- .../GTBRegimeComunhaoTable.tsx | 2 +- .../GTBTipoLogradouroForm.tsx | 4 +- .../GTBTipoLogradouroIndex.tsx} | 14 +- .../GTBTipoLogradouroTable.tsx | 2 +- .../components/GUF/GUFSelec.tsx | 0 .../components/TCensec}/TCensecForm.tsx | 2 +- .../components/TCensec/TCensecIndex.tsx} | 14 +- .../components/TCensec}/TCensecTable.tsx | 2 +- .../TCensecNaturezaLitigioForm.tsx | 2 +- .../TCensecNaturezaLitigioIndex.tsx} | 14 +- .../TCensecNaturezaLitigioTable.tsx | 2 +- .../TCensecTipoAto}/TCensecTipoAtoForm.tsx | 4 +- .../TCensecTipoAto/TCensecTipoAtoIndex.tsx} | 16 +- .../TCensecTipoAto/TCensecTipoAtoSelect.tsx | 2 +- .../TCensecTipoAto/TCensecTipoAtoTable.tsx | 128 +++++++++ .../TImovel/TImovelTipoLogradouroSelect.tsx | 2 +- .../components/TMinuta}/TMinutaForm.tsx | 4 +- .../components/TMinuta}/TMinutaTable.tsx | 2 +- .../TPessoaFisica/TPessoaFisicaForm.tsx | 6 +- .../TTBAndamentoServicoForm.tsx | 4 +- .../TTBAndamentoServicoIndex.tsx} | 14 +- .../TTBAndamentoServicoTable.tsx | 2 +- .../TTBReconhecimentoTipoForm.tsx | 4 +- .../TTBReconhecimentoTipoIndex.tsx} | 14 +- .../TTBReconhecimentoTipoTable.tsx | 2 +- .../data}/GCidade/GCidadeIndexData.ts | 0 .../data}/GCidade/GCidadeRemoveData.ts | 2 +- .../data}/GCidade/GCidadeSaveData.ts | 2 +- .../data}/GMedidoTipo/GMedidaTipoIndexData.ts | 0 .../GMedidoTipo/GMedidaTipoRemoveData.ts | 2 +- .../data}/GMedidoTipo/GMedidaTipoSaveData.ts | 2 +- .../data}/GTBBairro/GTBBairroIndexData.ts | 0 .../data}/GTBBairro/GTBBairroRemoveData.ts | 2 +- .../data}/GTBBairro/GTBBairroSaveData.ts | 2 +- .../GTBEstadoCivil/GTBEstadoCivilIndexData.ts | 2 +- .../GTBEstadoCivilRemoveData.ts | 4 +- .../GTBEstadoCivil/GTBEstadoCivilSaveData.ts | 4 +- .../GTBProfissao/GTBProfissaoIndexData.ts | 0 .../GTBProfissao/GTBProfissaoRemoveData.ts | 2 +- .../GTBProfissao/GTBProfissaoSaveData.ts | 2 +- .../GTBRegimeBens/GTBRegimeBensIndexData.ts | 0 .../GTBRegimeBens/GTBRegimeBensRemoveData.ts | 2 +- .../GTBRegimeBens/GTBRegimeBensSaveData.ts | 2 +- .../GTBTipoLogradouroIndexData.ts | 0 .../GTBTipoLogradouroRemoveData.ts | 2 +- .../GTBTipoLogradouroSaveData.ts | 2 +- .../GTBRegimeComunhaoIndexData.ts | 2 +- .../GTBRegimeComunhaoRemoveData.ts | 2 +- .../GTBRegimeComunhaoSaveData.ts | 2 +- .../administrativo/data}/GUf/GUfIndexData.ts | 0 .../data/GUsuario}/GUsuarioDeleteData.ts | 0 .../data/GUsuario}/GUsuarioIndexData.ts | 0 .../data/GUsuario}/GUsuarioLoginData.ts | 0 .../data/GUsuario}/GUsuarioReadData.ts | 0 .../data/GUsuario}/GUsuarioSaveData.ts | 0 .../data}/TCensec/TCensecDeleteData.ts | 2 +- .../data}/TCensec/TCensecIndexData.ts | 0 .../data}/TCensec/TCensecSaveData.ts | 2 +- .../TCensecNaturezaLitigioIndexData.ts | 0 .../TCensecNaturezaLitigioRemoveData.ts | 2 +- .../TCensecNaturezaLitigioSaveData.ts | 2 +- .../TCensecTipoAto/GMedidaTipoIndexData.ts | 3 - .../TCensecTipoAto/GMedidaTipoRemoveData.ts | 2 +- .../TCensecTipoAto/GMedidaTipoSaveData.ts | 2 +- .../data}/TMinuta/MinutaTexto.ts | 0 .../data}/TMinuta/TMinutaIndex.ts | 0 .../data}/TMinuta/TMinutaIndexData.ts | 0 .../data}/TMinuta/TMinutaRemoveData.ts | 2 +- .../data}/TMinuta/TMinutaSaveData.ts | 2 +- .../data}/TMinuta/mockMinuta.ts | 0 .../TTBAndamentoServicoIndexData.ts | 0 .../TTBAndamentoServicoRemoveData.ts | 2 +- .../TTBAndamentoServicoSaveData.ts | 2 +- .../TTBReconhecimentoTipoDeleteData.ts | 2 +- .../TTBReconhecimentoTipoIndexData.ts | 0 .../TTBReconhecimentoTipoSaveData.ts | 2 +- .../hooks/GCidade}/useGCidadeReadHook.ts | 4 +- .../hooks/GCidade}/useGCidadeRemoveHook.ts | 4 +- .../hooks/GCidade}/useGCidadeSaveHook.ts | 9 +- .../GMedidaTipo}/useGMedidaTipoReadHook.ts | 4 +- .../GMedidaTipo}/useGMedidaTipoRemoveHook.ts | 4 +- .../GMedidaTipo}/useGMedidaTipoSaveHook.ts | 4 +- .../hooks/GTBBairro}/useGTBBairroReadHook.ts | 4 +- .../GTBBairro}/useGTBBairroRemoveHook.ts | 4 +- .../hooks/GTBBairro}/useGTBBairroSaveHook.ts | 4 +- .../useGTBEstadoCivilReadHook.ts | 4 +- .../useGTBEstadoCivilRemoveHook.ts | 4 +- .../useGTBEstadoCivilSaveHook.ts | 4 +- .../GTBProfissao}/useGTBProfissaoReadHook.ts | 4 +- .../useGTBProfissaoRemoveHook.ts | 4 +- .../GTBProfissao}/useGTBProfissaoSaveHook.ts | 4 +- .../useGTBRegimeBensReadHook.ts | 4 +- .../useGTBRegimeBensRemoveHook.ts | 4 +- .../useGTBRegimeBensSaveHook.ts | 4 +- .../useGTBRegimeComunhaoReadHook.ts | 4 +- .../useGTBRegimeComunhaoRemoveHook.ts | 4 +- .../useGTBRegimeComunhaoSaveHook.ts | 4 +- .../useGTBTipoLogradouroReadHook.ts | 4 +- .../useGTBTipoLogradouroRemoveHook.ts | 4 +- .../useGTBTipoLogradouroSaveHook.ts | 4 +- .../hooks/GUF}/useGUfReadHook.ts | 4 +- .../hooks/GUsuario}/useGUsuarioIndexHook.ts | 4 +- .../hooks/GUsuario}/useGUsuarioLogoutHook.ts | 2 +- .../hooks/GUsuario}/useGUsuarioReadHooks.ts | 4 +- .../hooks/GUsuario}/useGUsuarioSaveHook.ts | 4 +- .../hooks/TCensec}/useTCensecDeleteHook.ts | 4 +- .../hooks/TCensec}/useTCensecReadHook.ts | 4 +- .../hooks/TCensec}/useTCensecSaveHook.ts | 4 +- .../useTCensecNaturezaLitigioReadHook.ts | 4 +- .../useTCensecNaturezaLitigioRemoveHook.ts | 4 +- .../useTCensecNaturezaLitigioSaveHook.ts | 4 +- .../useTCensecTipoAtoReadHook.ts | 4 +- .../useTCensecTipoAtoRemoveHook.ts | 4 +- .../useTCensecTipoAtoSaveHook.ts | 4 +- .../hooks/TMinuta}/useTMinutaIndexHook.ts | 4 +- .../hooks/TMinuta}/useTMinutaReadHook.ts | 4 +- .../hooks/TMinuta}/useTMinutaRemoveHook.ts | 4 +- .../hooks/TMinuta}/useTMinutaSaveHook.ts | 4 +- .../useTTBAndamentoServicoDeleteHook.ts | 4 +- .../useTTBAndamentoServicoReadHook.ts | 4 +- .../useTTBAndamentoServicoSaveHook.ts | 4 +- .../useTTBReconhecimentoTipoDeleteHook.ts | 4 +- .../useTTBReconhecimentoTipoReadHook.ts | 4 +- .../useTTBReconhecimentoTipoSaveHook.ts | 4 +- .../interfaces/GCidade}/GCidadeInterface.ts | 0 .../GMedidaTipo}/GMedidaTipoInterface.ts | 0 .../GTBBairro}/GTBBairroInterface.ts | 0 .../GTBBairro/GTBairroSelectInterface.ts | 0 .../GTBEstadoCivilInterface.ts | 0 .../GTBProfissao}/GTBProfissaoInterface.ts | 0 .../GTBRegimeBens}/GTBRegimeBensInterface.ts | 0 .../GTBRegimeComunhaoInterface.ts | 0 .../GTBTipoLogradouroInterface.ts | 0 .../interfaces/GUF}/GUfInterface.ts | 0 .../interfaces/GUsuario}/GUsuarioInterface.ts | 0 .../interfaces/TCensec}/TCensecInterface.ts | 0 .../TCensecNaturezaLitigioInterface.ts | 0 .../TCensecTipoAtoInterface.ts | 0 .../interfaces/TMinuta}/TMinutaInterface.ts | 0 .../TTBAndamentoServicoInterface.ts | 0 .../TTBReconhecimentoTipoInterface.ts | 0 .../schemas/GCidade}/GCidadeSchema.ts | 0 .../schemas/GMedidaTipo}/GMedidaTipoSchema.ts | 0 .../schemas/GTBBairro}/GTBBairroSchema.ts | 0 .../GTBEstadoCivil}/GTBEstadoCivilSchema.ts | 0 .../GTBProfissao}/GTBProfissaoSchema.ts | 0 .../GTBRegimeBens}/GTBRegimeBensSchema.ts | 0 .../GTBRegimeComunhaoSchema.ts | 0 .../GTBTipoLogradouroSchema.ts | 0 .../schemas/GUsuario}/GUsuarioLoginSchema.ts | 0 .../schemas/GUsuario}/GUsuarioSchema.ts | 0 .../schemas/TCensec}/TCensecSchema.ts | 0 .../TCensecNaturezaLitigioSchema.ts | 0 .../TCensecTipoAto}/TCensecTipoAtoSchema.ts | 0 .../schemas/TMinuta}/TMinutaSchema.ts | 0 .../TTBAndamentoServicoSchema.ts | 2 +- .../TTBReconhecimentoTipoSchema.ts | 2 +- .../services/GCidade}/GCidadeIndexService.ts | 2 +- .../services/GCidade}/GCidadeRemoveService.ts | 4 +- .../services/GCidade}/GCidadeSaveService.ts | 4 +- .../GMedidaTipo}/GMedidaTipoIndexService.ts | 2 +- .../GMedidaTipo}/GMedidaTipoRemoveService.ts | 4 +- .../GMedidaTipo}/GMedidaTipoSaveService.ts | 4 +- .../GTBBairro}/GTBBairroIndexService.ts | 2 +- .../GTBBairro}/GTBBairroRemoveService.ts | 4 +- .../GTBBairro}/GTBBairroSaveService.ts | 4 +- .../GTBEstadoCivilIndexService.ts | 2 +- .../GTBEstadoCivilRemoveService.ts | 4 +- .../GTBEstadoCivilSaveService.ts | 4 +- .../GTBProfissao}/GTBProfissaoIndexService.ts | 2 +- .../GTBProfissao/GTBProfissaoRemoveService.ts | 8 + .../GTBProfissao/GTBProfissaoSaveService.ts | 7 + .../GTBRegimeBensIndexService.ts | 2 +- .../GTBRegimeBensRemoveService.ts | 8 + .../GTBRegimeBensSaveService.ts | 4 +- .../GTBRegimeComunhaoIndexService.ts | 2 +- .../GTBRegimeComunhaoRemoveService.ts | 4 +- .../GTBRegimeComunhaoSaveService.ts | 4 +- .../GTBTipoLogradouroIndexService.ts | 2 +- .../GTBTipoLogradouroRemoveService.ts | 4 +- .../GTBTipoLogradouroSaveService.ts | 4 +- .../services/GUF}/GUfIndexService.ts | 2 +- .../services/GUsuario}/GUsuarioIndex.ts | 2 +- .../services/GUsuario}/GUsuarioLogin.ts | 2 +- .../GUsuario}/GUsuarioLogoutService.ts | 0 .../services/GUsuario}/GUsuarioRead.ts | 2 +- .../services/GUsuario}/GUsuarioSave.ts | 2 +- .../services/TCensec}/TCensecDeleteService.ts | 4 +- .../services/TCensec}/TCensecIndexService.ts | 2 +- .../services/TCensec}/TCensecSaveService.ts | 4 +- .../TCensecNaturezaLitigioIndexService.ts | 2 +- .../TCensecNaturezaLitigioRemoveService.ts | 4 +- .../TCensecNaturezaLitigioSaveService.ts | 4 +- .../TCensecTipoAtoIndexService.ts | 2 +- .../TCensecTipoAtoRemoveService.ts | 4 +- .../TCensecTipoAtoSaveService.ts | 4 +- .../services/TMinuta/TMinutaIndex.ts | 7 + .../services/TMinuta}/TMinutaIndexService.ts | 4 +- .../services/TMinuta}/TMinutaRemoveService.ts | 4 +- .../services/TMinuta}/TMinutaSaveService.ts | 4 +- 253 files changed, 810 insertions(+), 1114 deletions(-) create mode 100644 src/app/(protected)/(administrativo)/administrativo/andamentos/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/bairros/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/centrais/censec/centrais/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/centrais/censec/naturezas-litigios/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/centrais/censec/qualidades/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/centrais/censec/tipos-atos/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/cidades/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/imoveis/tipos-logradouros/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/medidas/tipos/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/pessoas/estados-civis/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/pessoas/profissoes/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/pessoas/regimes-bens/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/pessoas/regimes-comunhao/page.tsx create mode 100644 src/app/(protected)/(administrativo)/administrativo/reconhecimentos/page.tsx delete mode 100644 src/app/(protected)/(cadastros)/cadastros/(g_cidade)/cidades/page.tsx delete mode 100644 src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoTable.tsx delete mode 100644 src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/mockCensecTipoAto.ts delete mode 100644 src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoRemoveService.ts delete mode 100644 src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoSaveService.ts delete mode 100644 src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensRemoveService.ts delete mode 100644 src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaIndex.ts delete mode 100644 src/app/(protected)/(cadastros)/cadastros/pessoas/complementos/page.tsx delete mode 100644 src/app/(protected)/(servicos)/servicos/page.tsx rename src/{app/(protected)/(cadastros)/cadastros/_components/g_cidade => packages/administrativo/components/GCidade}/GCidadeForm.tsx (94%) create mode 100644 src/packages/administrativo/components/GCidade/GCidadeIndex.tsx rename src/{app/(protected)/(cadastros)/cadastros/_components/g_cidade => packages/administrativo/components/GCidade}/GCidadeTable.tsx (98%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_medidatipo => packages/administrativo/components/GMedidaTipo}/GMedidaTipoForm.tsx (95%) rename src/{app/(protected)/(cadastros)/cadastros/(g_medidatipo)/medida-tipo/page.tsx => packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex.tsx} (88%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_medidatipo => packages/administrativo/components/GMedidaTipo}/GMedidaTipoTable.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro => packages/administrativo/components/GTBBairro}/GTBBairroForm.tsx (98%) rename src/{app/(protected)/(cadastros)/cadastros/(g_tb_bairro)/bairro/page.tsx => packages/administrativo/components/GTBBairro/GTBBairroIndex.tsx} (89%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro => packages/administrativo/components/GTBBairro}/GTBBairroTable.tsx (97%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil => packages/administrativo/components/GTBEstadoCivil}/GTBEstadoCivilForm.tsx (95%) rename src/{app/(protected)/(cadastros)/cadastros/(g_tb_estadocivil)/estado-civil/page.tsx => packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex.tsx} (87%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil => packages/administrativo/components/GTBEstadoCivil}/GTBEstadoCivilTable.tsx (97%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_profissao => packages/administrativo/components/GTBProfissao}/GTBProfissaoForm.tsx (97%) rename src/{app/(protected)/(cadastros)/cadastros/(g_tb_profissao)/profissoes/page.tsx => packages/administrativo/components/GTBProfissao/GTBProfissaoIndex.tsx} (87%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_profissao => packages/administrativo/components/GTBProfissao}/GTBProfissaoTable.tsx (97%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_regimebens => packages/administrativo/components/GTBRegimeBens}/GTBRegimeBensForm.tsx (97%) rename src/{app/(protected)/(cadastros)/cadastros/(g_tb_regimebens)/regime-bens/page.tsx => packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex.tsx} (86%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_regimebens => packages/administrativo/components/GTBRegimeBens}/GTBRegimeBensTable.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_regimecomunhao => packages/administrativo/components/GTBRegimeComunhao}/GTBRegimeComunhaoForm.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/(g_tb_regimecomunhao)/regime-comunhao/page.tsx => packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex.tsx} (86%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_regimecomunhao => packages/administrativo/components/GTBRegimeComunhao}/GTBRegimeComunhaoTable.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro => packages/administrativo/components/GTBTipoLogradouro}/GTBTipoLogradouroForm.tsx (95%) rename src/{app/(protected)/(cadastros)/cadastros/(g_tb_tipologradouro)/tipo-logradouro/page.tsx => packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex.tsx} (87%) rename src/{app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro => packages/administrativo/components/GTBTipoLogradouro}/GTBTipoLogradouroTable.tsx (96%) delete mode 100644 src/packages/administrativo/components/GUF/GUFSelec.tsx rename src/{app/(protected)/(cadastros)/cadastros/_components/t_censec => packages/administrativo/components/TCensec}/TCensecForm.tsx (97%) rename src/{app/(protected)/(cadastros)/cadastros/(t_censec)/censec/page.tsx => packages/administrativo/components/TCensec/TCensecIndex.tsx} (89%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_censec => packages/administrativo/components/TCensec}/TCensecTable.tsx (97%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio => packages/administrativo/components/TCensecNaturezaLitigio}/TCensecNaturezaLitigioForm.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/(t_censecnaturezalitigio)/censec-natureza-litigio/page.tsx => packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex.tsx} (85%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio => packages/administrativo/components/TCensecNaturezaLitigio}/TCensecNaturezaLitigioTable.tsx (95%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato => packages/administrativo/components/TCensecTipoAto}/TCensecTipoAtoForm.tsx (98%) rename src/{app/(protected)/(cadastros)/cadastros/(t_censec_tipoato)/censec-tipoato/page.tsx => packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx} (85%) create mode 100644 src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx rename src/{app/(protected)/(cadastros)/cadastros/_components/t_minuta => packages/administrativo/components/TMinuta}/TMinutaForm.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_minuta => packages/administrativo/components/TMinuta}/TMinutaTable.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_tb_andamentoservico => packages/administrativo/components/TTBAndamentoServico}/TTBAndamentoServicoForm.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/(t_tb_andamentoservico)/andamentos/page.tsx => packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex.tsx} (85%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_tb_andamentoservico => packages/administrativo/components/TTBAndamentoServico}/TTBAndamentoServicoTable.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_tb_reconhecimentotipo => packages/administrativo/components/TTBReconhecimentoTipo}/TTBReconhecimentoTipoForm.tsx (94%) rename src/{app/(protected)/(cadastros)/cadastros/(t_tb_reconhecimentotipo)/reconhecimentos/page.tsx => packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex.tsx} (85%) rename src/{app/(protected)/(cadastros)/cadastros/_components/t_tb_reconhecimentotipo => packages/administrativo/components/TTBReconhecimentoTipo}/TTBReconhecimentoTipoTable.tsx (96%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GCidade/GCidadeIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GCidade/GCidadeRemoveData.ts (92%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GCidade/GCidadeSaveData.ts (93%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GMedidoTipo/GMedidaTipoIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GMedidoTipo/GMedidaTipoRemoveData.ts (85%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GMedidoTipo/GMedidaTipoSaveData.ts (87%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBBairro/GTBBairroIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBBairro/GTBBairroRemoveData.ts (83%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBBairro/GTBBairroSaveData.ts (85%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBEstadoCivil/GTBEstadoCivilIndexData.ts (89%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts (73%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBEstadoCivil/GTBEstadoCivilSaveData.ts (76%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBProfissao/GTBProfissaoIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBProfissao/GTBProfissaoRemoveData.ts (76%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBProfissao/GTBProfissaoSaveData.ts (80%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBRegimeBens/GTBRegimeBensIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBRegimeBens/GTBRegimeBensRemoveData.ts (79%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBRegimeBens/GTBRegimeBensSaveData.ts (88%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts (84%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts (86%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts (75%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts (78%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts (82%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/GUf/GUfIndexData.ts (100%) rename src/{app/(protected)/(administrativo)/_data/g_usuario => packages/administrativo/data/GUsuario}/GUsuarioDeleteData.ts (100%) rename src/{app/(protected)/(administrativo)/_data/g_usuario => packages/administrativo/data/GUsuario}/GUsuarioIndexData.ts (100%) rename src/{app/(protected)/(administrativo)/_data/g_usuario => packages/administrativo/data/GUsuario}/GUsuarioLoginData.ts (100%) rename src/{app/(protected)/(administrativo)/_data/g_usuario => packages/administrativo/data/GUsuario}/GUsuarioReadData.ts (100%) rename src/{app/(protected)/(administrativo)/_data/g_usuario => packages/administrativo/data/GUsuario}/GUsuarioSaveData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensec/TCensecDeleteData.ts (87%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensec/TCensecIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensec/TCensecSaveData.ts (89%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts (83%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts (85%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensecTipoAto/GMedidaTipoIndexData.ts (86%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensecTipoAto/GMedidaTipoRemoveData.ts (85%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TCensecTipoAto/GMedidaTipoSaveData.ts (87%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TMinuta/MinutaTexto.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TMinuta/TMinutaIndex.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TMinuta/TMinutaIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TMinuta/TMinutaRemoveData.ts (81%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TMinuta/TMinutaSaveData.ts (84%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TMinuta/mockMinuta.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts (81%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts (87%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts (78%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_data => packages/administrativo/data}/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts (81%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_cidade => packages/administrativo/hooks/GCidade}/useGCidadeReadHook.ts (80%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_cidade => packages/administrativo/hooks/GCidade}/useGCidadeRemoveHook.ts (74%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_cidade => packages/administrativo/hooks/GCidade}/useGCidadeSaveHook.ts (68%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo => packages/administrativo/hooks/GMedidaTipo}/useGMedidaTipoReadHook.ts (72%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo => packages/administrativo/hooks/GMedidaTipo}/useGMedidaTipoRemoveHook.ts (66%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo => packages/administrativo/hooks/GMedidaTipo}/useGMedidaTipoSaveHook.ts (80%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro => packages/administrativo/hooks/GTBBairro}/useGTBBairroReadHook.ts (77%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro => packages/administrativo/hooks/GTBBairro}/useGTBBairroRemoveHook.ts (62%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro => packages/administrativo/hooks/GTBBairro}/useGTBBairroSaveHook.ts (78%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil => packages/administrativo/hooks/GTBEstadoCivil}/useGTBEstadoCivilReadHook.ts (71%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil => packages/administrativo/hooks/GTBEstadoCivil}/useGTBEstadoCivilRemoveHook.ts (64%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil => packages/administrativo/hooks/GTBEstadoCivil}/useGTBEstadoCivilSaveHook.ts (79%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao => packages/administrativo/hooks/GTBProfissao}/useGTBProfissaoReadHook.ts (69%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao => packages/administrativo/hooks/GTBProfissao}/useGTBProfissaoRemoveHook.ts (62%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao => packages/administrativo/hooks/GTBProfissao}/useGTBProfissaoSaveHook.ts (77%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens => packages/administrativo/hooks/GTBRegimeBens}/useGTBRegimeBensReadHook.ts (71%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens => packages/administrativo/hooks/GTBRegimeBens}/useGTBRegimeBensRemoveHook.ts (67%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens => packages/administrativo/hooks/GTBRegimeBens}/useGTBRegimeBensSaveHook.ts (81%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao => packages/administrativo/hooks/GTBRegimeComunhao}/useGTBRegimeComunhaoReadHook.ts (71%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao => packages/administrativo/hooks/GTBRegimeComunhao}/useGTBRegimeComunhaoRemoveHook.ts (64%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao => packages/administrativo/hooks/GTBRegimeComunhao}/useGTBRegimeComunhaoSaveHook.ts (81%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro => packages/administrativo/hooks/GTBTipoLogradouro}/useGTBTipoLogradouroReadHook.ts (73%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro => packages/administrativo/hooks/GTBTipoLogradouro}/useGTBTipoLogradouroRemoveHook.ts (63%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro => packages/administrativo/hooks/GTBTipoLogradouro}/useGTBTipoLogradouroSaveHook.ts (79%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/g_uf => packages/administrativo/hooks/GUF}/useGUfReadHook.ts (78%) rename src/{app/(protected)/(administrativo)/_hooks/g_usuario => packages/administrativo/hooks/GUsuario}/useGUsuarioIndexHook.ts (80%) rename src/{app/(protected)/(administrativo)/_hooks/g_usuario => packages/administrativo/hooks/GUsuario}/useGUsuarioLogoutHook.ts (68%) rename src/{app/(protected)/(administrativo)/_hooks/g_usuario => packages/administrativo/hooks/GUsuario}/useGUsuarioReadHooks.ts (79%) rename src/{app/(protected)/(administrativo)/_hooks/g_usuario => packages/administrativo/hooks/GUsuario}/useGUsuarioSaveHook.ts (78%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censec => packages/administrativo/hooks/TCensec}/useTCensecDeleteHook.ts (68%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censec => packages/administrativo/hooks/TCensec}/useTCensecReadHook.ts (74%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censec => packages/administrativo/hooks/TCensec}/useTCensecSaveHook.ts (84%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio => packages/administrativo/hooks/TCensecNaturezaLitigio}/useTCensecNaturezaLitigioReadHook.ts (67%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio => packages/administrativo/hooks/TCensecNaturezaLitigio}/useTCensecNaturezaLitigioRemoveHook.ts (68%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio => packages/administrativo/hooks/TCensecNaturezaLitigio}/useTCensecNaturezaLitigioSaveHook.ts (75%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato => packages/administrativo/hooks/TCensecTipoAto}/useTCensecTipoAtoReadHook.ts (72%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato => packages/administrativo/hooks/TCensecTipoAto}/useTCensecTipoAtoRemoveHook.ts (65%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato => packages/administrativo/hooks/TCensecTipoAto}/useTCensecTipoAtoSaveHook.ts (77%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_minuta => packages/administrativo/hooks/TMinuta}/useTMinutaIndexHook.ts (70%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_minuta => packages/administrativo/hooks/TMinuta}/useTMinutaReadHook.ts (71%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_minuta => packages/administrativo/hooks/TMinuta}/useTMinutaRemoveHook.ts (63%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_minuta => packages/administrativo/hooks/TMinuta}/useTMinutaSaveHook.ts (78%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico => packages/administrativo/hooks/TTBAndamentoServico}/useTTBAndamentoServicoDeleteHook.ts (69%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico => packages/administrativo/hooks/TTBAndamentoServico}/useTTBAndamentoServicoReadHook.ts (78%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico => packages/administrativo/hooks/TTBAndamentoServico}/useTTBAndamentoServicoSaveHook.ts (78%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo => packages/administrativo/hooks/TTBReconhecimentoTipo}/useTTBReconhecimentoTipoDeleteHook.ts (60%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo => packages/administrativo/hooks/TTBReconhecimentoTipo}/useTTBReconhecimentoTipoReadHook.ts (69%) rename src/{app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo => packages/administrativo/hooks/TTBReconhecimentoTipo}/useTTBReconhecimentoTipoSaveHook.ts (77%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GCidade}/GCidadeInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GMedidaTipo}/GMedidaTipoInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GTBBairro}/GTBBairroInterface.ts (100%) rename src/packages/administrativo/{components => interfaces}/GTBBairro/GTBairroSelectInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GTBEstadoCivil}/GTBEstadoCivilInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GTBProfissao}/GTBProfissaoInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GTBRegimeBens}/GTBRegimeBensInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GTBRegimeComunhao}/GTBRegimeComunhaoInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GTBTipoLogradouro}/GTBTipoLogradouroInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/GUF}/GUfInterface.ts (100%) rename src/{app/(protected)/(administrativo)/_interfaces => packages/administrativo/interfaces/GUsuario}/GUsuarioInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/TCensec}/TCensecInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/TCensecNaturezaLitigio}/TCensecNaturezaLitigioInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/TCensecTipoAto}/TCensecTipoAtoInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/TMinuta}/TMinutaInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/TTBAndamentoServico}/TTBAndamentoServicoInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_interfaces => packages/administrativo/interfaces/TTBREconhecimentoTipo}/TTBReconhecimentoTipoInterface.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/GCidade}/GCidadeSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/GMedidaTipo}/GMedidaTipoSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/GTBBairro}/GTBBairroSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/GTBEstadoCivil}/GTBEstadoCivilSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/GTBProfissao}/GTBProfissaoSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/GTBRegimeBens}/GTBRegimeBensSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/GTBRegimeComunhao}/GTBRegimeComunhaoSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/GTBTipoLogradouro}/GTBTipoLogradouroSchema.ts (100%) rename src/{app/(protected)/(administrativo)/_schemas => packages/administrativo/schemas/GUsuario}/GUsuarioLoginSchema.ts (100%) rename src/{app/(protected)/(administrativo)/_schemas => packages/administrativo/schemas/GUsuario}/GUsuarioSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/TCensec}/TCensecSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/TCensecNaturezaLitigio}/TCensecNaturezaLitigioSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/TCensecTipoAto}/TCensecTipoAtoSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/TMinuta}/TMinutaSchema.ts (100%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/TTBAndamentoServico}/TTBAndamentoServicoSchema.ts (79%) rename src/{app/(protected)/(cadastros)/cadastros/_schemas => packages/administrativo/schemas/TTBReconhecimentoTipo}/TTBReconhecimentoTipoSchema.ts (73%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_cidade => packages/administrativo/services/GCidade}/GCidadeIndexService.ts (88%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_cidade => packages/administrativo/services/GCidade}/GCidadeRemoveService.ts (79%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_cidade => packages/administrativo/services/GCidade}/GCidadeSaveService.ts (80%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_medidatipo => packages/administrativo/services/GMedidaTipo}/GMedidaTipoIndexService.ts (79%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_medidatipo => packages/administrativo/services/GMedidaTipo}/GMedidaTipoRemoveService.ts (66%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_medidatipo => packages/administrativo/services/GMedidaTipo}/GMedidaTipoSaveService.ts (66%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro => packages/administrativo/services/GTBBairro}/GTBBairroIndexService.ts (76%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro => packages/administrativo/services/GTBBairro}/GTBBairroRemoveService.ts (62%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro => packages/administrativo/services/GTBBairro}/GTBBairroSaveService.ts (62%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil => packages/administrativo/services/GTBEstadoCivil}/GTBEstadoCivilIndexService.ts (77%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil => packages/administrativo/services/GTBEstadoCivil}/GTBEstadoCivilRemoveService.ts (66%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil => packages/administrativo/services/GTBEstadoCivil}/GTBEstadoCivilSaveService.ts (65%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao => packages/administrativo/services/GTBProfissao}/GTBProfissaoIndexService.ts (56%) create mode 100644 src/packages/administrativo/services/GTBProfissao/GTBProfissaoRemoveService.ts create mode 100644 src/packages/administrativo/services/GTBProfissao/GTBProfissaoSaveService.ts rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens => packages/administrativo/services/GTBRegimeBens}/GTBRegimeBensIndexService.ts (55%) create mode 100644 src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensRemoveService.ts rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens => packages/administrativo/services/GTBRegimeBens}/GTBRegimeBensSaveService.ts (64%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao => packages/administrativo/services/GTBRegimeComunhao}/GTBRegimeComunhaoIndexService.ts (78%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao => packages/administrativo/services/GTBRegimeComunhao}/GTBRegimeComunhaoRemoveService.ts (65%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao => packages/administrativo/services/GTBRegimeComunhao}/GTBRegimeComunhaoSaveService.ts (65%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro => packages/administrativo/services/GTBTipoLogradouro}/GTBTipoLogradouroIndexService.ts (77%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro => packages/administrativo/services/GTBTipoLogradouro}/GTBTipoLogradouroRemoveService.ts (64%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro => packages/administrativo/services/GTBTipoLogradouro}/GTBTipoLogradouroSaveService.ts (64%) rename src/{app/(protected)/(cadastros)/cadastros/_services/g_uf => packages/administrativo/services/GUF}/GUfIndexService.ts (66%) rename src/{app/(protected)/(administrativo)/_services/g_usuario => packages/administrativo/services/GUsuario}/GUsuarioIndex.ts (64%) rename src/{app/(protected)/(administrativo)/_services/g_usuario => packages/administrativo/services/GUsuario}/GUsuarioLogin.ts (91%) rename src/{app/(protected)/(administrativo)/_services/g_usuario => packages/administrativo/services/GUsuario}/GUsuarioLogoutService.ts (100%) rename src/{app/(protected)/(administrativo)/_services/g_usuario => packages/administrativo/services/GUsuario}/GUsuarioRead.ts (81%) rename src/{app/(protected)/(administrativo)/_services/g_usuario => packages/administrativo/services/GUsuario}/GUsuarioSave.ts (61%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censec => packages/administrativo/services/TCensec}/TCensecDeleteService.ts (69%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censec => packages/administrativo/services/TCensec}/TCensecIndexService.ts (81%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censec => packages/administrativo/services/TCensec}/TCensecSaveService.ts (69%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio => packages/administrativo/services/TCensecNaturezaLitigio}/TCensecNaturezaLitigioIndexService.ts (75%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio => packages/administrativo/services/TCensecNaturezaLitigio}/TCensecNaturezaLitigioRemoveService.ts (63%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio => packages/administrativo/services/TCensecNaturezaLitigio}/TCensecNaturezaLitigioSaveService.ts (63%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato => packages/administrativo/services/TCensecTipoAto}/TCensecTipoAtoIndexService.ts (79%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato => packages/administrativo/services/TCensecTipoAto}/TCensecTipoAtoRemoveService.ts (66%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato => packages/administrativo/services/TCensecTipoAto}/TCensecTipoAtoSaveService.ts (66%) create mode 100644 src/packages/administrativo/services/TMinuta/TMinutaIndex.ts rename src/{app/(protected)/(cadastros)/cadastros/_services/t_minuta => packages/administrativo/services/TMinuta}/TMinutaIndexService.ts (51%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_minuta => packages/administrativo/services/TMinuta}/TMinutaRemoveService.ts (50%) rename src/{app/(protected)/(cadastros)/cadastros/_services/t_minuta => packages/administrativo/services/TMinuta}/TMinutaSaveService.ts (50%) 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 d9eac18..c1353b7 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 @@ -4,8 +4,8 @@ import { useEffect } from 'react'; 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 { useGUsuarioReadHooks } from '@/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks'; +import Usuario from '@/packages/administrativo/interfaces/GUsuario/GUsuarioInterface'; import Loading from '@/shared/components/loading/loading'; export default function UsuarioDetalhes() { diff --git a/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/formulario/page.tsx b/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/formulario/page.tsx index 0148969..5c54cba 100644 --- a/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/formulario/page.tsx +++ b/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/formulario/page.tsx @@ -4,7 +4,7 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; import { z } from 'zod'; import { Input } from '@/components/ui/input'; -import { GUsuarioSchema } from '../../../_schemas/GUsuarioSchema'; +import { GUsuarioSchema } from '../../../../../../packages/administrativo/schemas/GUsuario/GUsuarioSchema'; import { Button } from '@/components/ui/button'; @@ -19,7 +19,7 @@ import { FormMessage, } from '@/components/ui/form'; -import { useGUsuarioSaveHook } from '../../../_hooks/g_usuario/useGUsuarioSaveHook'; +import { useGUsuarioSaveHook } from '../../../../../../packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook'; type FormValues = z.infer; diff --git a/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/page.tsx b/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/page.tsx index 95fcb73..3f1d234 100644 --- a/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/page.tsx +++ b/src/app/(protected)/(administrativo)/(g_usuario)/usuarios/page.tsx @@ -11,10 +11,10 @@ import { TableRow, } from '@/components/ui/table'; -import Usuario from '../../_interfaces/GUsuarioInterface'; +import Usuario from '../../../../../packages/administrativo/interfaces/GUsuario/GUsuarioInterface'; import { Button } from '@/components/ui/button'; import Link from 'next/link'; -import { useGUsuarioIndexHook } from '../../_hooks/g_usuario/useGUsuarioIndexHook'; +import { useGUsuarioIndexHook } from '../../../../../packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook'; import { useEffect } from 'react'; import Loading from '@/shared/components/loading/loading'; diff --git a/src/app/(protected)/(administrativo)/administrativo/andamentos/page.tsx b/src/app/(protected)/(administrativo)/administrativo/andamentos/page.tsx new file mode 100644 index 0000000..3861396 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/andamentos/page.tsx @@ -0,0 +1,9 @@ +import TTBAndamentoServicoIndex from "@/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex"; + +export default function TAtoParteTipo() { + + return ( + < TTBAndamentoServicoIndex /> + ); + +} \ No newline at end of file diff --git a/src/app/(protected)/(administrativo)/administrativo/bairros/page.tsx b/src/app/(protected)/(administrativo)/administrativo/bairros/page.tsx new file mode 100644 index 0000000..d391288 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/bairros/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import GTBBairroIndex from "@/packages/administrativo/components/GTBBairro/GTBBairroIndex"; + +export default function GCidadePage() { + return ( + < GTBBairroIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/centrais/censec/centrais/page.tsx b/src/app/(protected)/(administrativo)/administrativo/centrais/censec/centrais/page.tsx new file mode 100644 index 0000000..8196519 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/centrais/censec/centrais/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import TCensecIndex from "@/packages/administrativo/components/TCensec/TCensecIndex"; + +export default function GTBEstadoCivilPage() { + return ( + < TCensecIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/centrais/censec/naturezas-litigios/page.tsx b/src/app/(protected)/(administrativo)/administrativo/centrais/censec/naturezas-litigios/page.tsx new file mode 100644 index 0000000..d195fb7 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/centrais/censec/naturezas-litigios/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import TCensecNaturezaLitigioIndex from "@/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex"; + +export default function GCidadePage() { + return ( + < TCensecNaturezaLitigioIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/centrais/censec/qualidades/page.tsx b/src/app/(protected)/(administrativo)/administrativo/centrais/censec/qualidades/page.tsx new file mode 100644 index 0000000..c061f40 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/centrais/censec/qualidades/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import TCensecQualidadeIndex from "@/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex"; + +export default function GTBEstadoCivilPage() { + return ( + < TCensecQualidadeIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/centrais/censec/tipos-atos/page.tsx b/src/app/(protected)/(administrativo)/administrativo/centrais/censec/tipos-atos/page.tsx new file mode 100644 index 0000000..352b068 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/centrais/censec/tipos-atos/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import TCensecTipoAtoIndex from "@/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex"; + +export default function GTBEstadoCivilPage() { + return ( + < TCensecTipoAtoIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/cidades/page.tsx b/src/app/(protected)/(administrativo)/administrativo/cidades/page.tsx new file mode 100644 index 0000000..498d0ee --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/cidades/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import GCidadeIndex from "@/packages/administrativo/components/GCidade/GCidadeIndex"; + +export default function GCidadePage() { + return ( + < GCidadeIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/imoveis/tipos-logradouros/page.tsx b/src/app/(protected)/(administrativo)/administrativo/imoveis/tipos-logradouros/page.tsx new file mode 100644 index 0000000..04f2049 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/imoveis/tipos-logradouros/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import GTBTipoLogradouroIndex from "@/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex"; + +export default function GMedidaTipoPage() { + return ( + < GTBTipoLogradouroIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/medidas/tipos/page.tsx b/src/app/(protected)/(administrativo)/administrativo/medidas/tipos/page.tsx new file mode 100644 index 0000000..f2d2b5a --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/medidas/tipos/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import GMedidaTipoIndex from "@/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex"; + +export default function GMedidaTipoPage() { + return ( + < GMedidaTipoIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/pessoas/estados-civis/page.tsx b/src/app/(protected)/(administrativo)/administrativo/pessoas/estados-civis/page.tsx new file mode 100644 index 0000000..737c164 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/pessoas/estados-civis/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import GTBEstadoCivilIndex from "@/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex"; + +export default function GTBEstadoCivilPage() { + return ( + < GTBEstadoCivilIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/pessoas/profissoes/page.tsx b/src/app/(protected)/(administrativo)/administrativo/pessoas/profissoes/page.tsx new file mode 100644 index 0000000..8ac0f10 --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/pessoas/profissoes/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import GTBProfissaoIndex from "@/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex"; + +export default function GTBEstadoCivilPage() { + return ( + < GTBProfissaoIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/pessoas/regimes-bens/page.tsx b/src/app/(protected)/(administrativo)/administrativo/pessoas/regimes-bens/page.tsx new file mode 100644 index 0000000..52f0ffd --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/pessoas/regimes-bens/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import GTBRegimeBensIndex from "@/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex"; + +export default function GTBRegimeBensPage() { + return ( + < GTBRegimeBensIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/pessoas/regimes-comunhao/page.tsx b/src/app/(protected)/(administrativo)/administrativo/pessoas/regimes-comunhao/page.tsx new file mode 100644 index 0000000..b513d3d --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/pessoas/regimes-comunhao/page.tsx @@ -0,0 +1,9 @@ +'use client'; + +import GTBRegimeComunhaoIndex from "@/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex"; + +export default function GTBRegimeBensPage() { + return ( + < GTBRegimeComunhaoIndex /> + ); +} diff --git a/src/app/(protected)/(administrativo)/administrativo/reconhecimentos/page.tsx b/src/app/(protected)/(administrativo)/administrativo/reconhecimentos/page.tsx new file mode 100644 index 0000000..58247dc --- /dev/null +++ b/src/app/(protected)/(administrativo)/administrativo/reconhecimentos/page.tsx @@ -0,0 +1,9 @@ +import TTBReconhecimentoTipoIndex from "@/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex"; + +export default function TAtoParteTipo() { + + return ( + < TTBReconhecimentoTipoIndex /> + ); + +} \ No newline at end of file diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_cidade)/cidades/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(g_cidade)/cidades/page.tsx deleted file mode 100644 index 22c02b2..0000000 --- a/src/app/(protected)/(cadastros)/cadastros/(g_cidade)/cidades/page.tsx +++ /dev/null @@ -1,163 +0,0 @@ -'use client'; - -import { useEffect, useState, useCallback } from 'react'; -import { Card, CardContent } from '@/components/ui/card'; - -import Loading from '@/shared/components/loading/loading'; -import GCidadeTable from '../../_components/g_cidade/GCidadeTable'; -import GCidadeForm from '../../_components/g_cidade/GCidadeForm'; - -import { useGCidadeReadHook } from '../../_hooks/g_cidade/useGCidadeReadHook'; -import { useGCidadeSaveHook } from '../../_hooks/g_cidade/useGCidadeSaveHook'; -import { useGCidadeRemoveHook } from '../../_hooks/g_cidade/useGCidadeRemoveHook'; - -import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; -import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import GCidadeInterface from '../../_interfaces/GCidadeInterface'; -import Header from '@/shared/components/structure/Header'; - -export default function GCidadePage() { - // Hooks para leitura e salvamento - const { gCidade, fetchGCidade } = useGCidadeReadHook(); - const { saveGCidade } = useGCidadeSaveHook(); - const { removeGCidade } = useGCidadeRemoveHook(); - - // Estados - const [selectedCidade, setSelectedCidade] = 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: GCidadeInterface | null) => { - setSelectedCidade(data); - setIsFormOpen(true); - }, []); - - /** - * Fecha o formulário e limpa o andamento selecionado - */ - const handleCloseForm = useCallback((_: null, __: boolean) => { - setSelectedCidade(null); - setIsFormOpen(false); - }, []); - - /** - * Salva os dados do formulário - */ - const handleSave = useCallback(async (formData: GCidadeInterface) => { - - - // Aguarda salvar o registro - await saveGCidade(formData); - - // Atualiza a lista de dados - fetchGCidade(); - }, - [saveGCidade, fetchGCidade], - ); - - /** - * Quando o usuário clica em "remover" na tabela - */ - const handleConfirmDelete = useCallback( - (item: GCidadeInterface) => { - // 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 removeGCidade(itemToDelete); - - // Atualiza a lista - await fetchGCidade(); - - // Limpa o item selecionado - setItemToDelete(null); - - // Fecha o modal - handleCancel(); - }, [itemToDelete, fetchGCidade, handleCancel]); - - /** - * Busca inicial dos dados - */ - useEffect(() => { - fetchGCidade(); - }, []); - - /** - * Tela de loading enquanto carrega os dados - */ - if (!gCidade) { - return ; - } - - return ( -
- {/* Cabeçalho */} -
{ - handleOpenForm(null); - }} - /> - - {/* Tabela de andamentos */} - - - - - - - {/* Modal de confirmação */} - - - {/* Formulário de criação/edição */} - -
- ); - 4; -} 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 108127f..b07e2fb 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 @@ -7,8 +7,8 @@ import { Card, CardContent } from '@/components/ui/card'; import MainEditor from '@/components/MainEditor'; import Loading from '@/shared/components/loading/loading'; -import { useTMinutaReadHook } from '../../../../_hooks/t_minuta/useTMinutaReadHook'; -import { TMinutaInterface } from '../../../../_interfaces/TMinutaInterface'; +import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook'; +import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; export default function TMinutaDetalhes() { const params = useParams(); diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/formulario/page.tsx b/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/formulario/page.tsx index 129ade3..8d851f1 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/formulario/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/formulario/page.tsx @@ -19,8 +19,8 @@ import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import MainEditor from '@/components/MainEditor'; -import { TMinutaSchema } from '../../../_schemas/TMinutaSchema'; -import { useTMinutaSaveHook } from '../../../_hooks/t_minuta/useTMinutaSaveHook'; +import { TMinutaSchema } from '@/packages/administrativo/schemas/TMinuta/TMinutaSchema'; +import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook'; import { Card, CardContent } from '@/components/ui/card'; type FormValues = z.infer; 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 b2f2b32..3a7ecd8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/page.tsx +++ b/src/app/(protected)/(cadastros)/cadastros/(t_minuta)/minuta/page.tsx @@ -8,15 +8,15 @@ 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'; +import TMinutaTable from '@/packages/administrativo/components/TMinuta/TMinutaTable'; +import TMinutaForm from '@/packages/administrativo/components/TMinuta/TMinutaForm'; -import { useTMinutaReadHook } from '../../_hooks/t_minuta/useTMinutaReadHook'; -import { useTMinutaSaveHook } from '../../_hooks/t_minuta/useTMinutaSaveHook'; -import { useTMinutaRemoveHook } from '../../_hooks/t_minuta/useTMinutaRemoveHook'; +import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook'; +import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook'; +import { useTMinutaRemoveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; -import { useTMinutaIndexHook } from '../../_hooks/t_minuta/useTMinutaIndexHook'; +import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; +import { useTMinutaIndexHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook'; export default function TMinutaPage() { // Hooks de leitura e escrita diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoTable.tsx b/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoTable.tsx deleted file mode 100644 index 9359597..0000000 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoTable.tsx +++ /dev/null @@ -1,127 +0,0 @@ -'use client'; - -import { Button } from "@/components/ui/button"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuGroup, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger -} from "@/components/ui/dropdown-menu"; -import { - Table, - TableBody, - TableCell, - TableHead, - TableHeader, - TableRow -} from "@/components/ui/table"; -import { EllipsisIcon, PencilIcon, Trash2Icon } from "lucide-react"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; -import TCensecInterface from "../../_interfaces/TCensecInterface"; - -interface TCensecTipoAtoTableProps { - data: TCensecTipoAtoInterface[]; - tCensec: TCensecInterface[]; - onEdit: (item: TCensecTipoAtoInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TCensecTipoAtoInterface, isEditingFormStatus: boolean) => void; -} - -function StatusBadge({ situacao }: { situacao: string }) { - const isActive = situacao === "A"; - - const baseClasses = - "text-xs font-medium px-2.5 py-0.5 rounded-sm me-2"; - - const activeClasses = - "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300"; - - const inactiveClasses = - "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300"; - - return ( - - {isActive ? "Ativo" : "Inativo"} - - ); -} - -export default function TCensecTipoAtoTable({ - data, - tCensec, - onEdit, - onDelete -}: TCensecTipoAtoTableProps) { - return ( - - - - # - Situação - Central do CENSEC - {/*Código*/} - Descrição - Separação - Revogação - Ações - - - - - {data.map((item) => { - const censecDesc = tCensec.find(c => c.censec_id === item.censec_id)?.descricao || "N/A" - return ( - - - {item.censec_tipoato_id} - - - - - {censecDesc} - {/*{item.codigo ?? "-"}*/} - {item.descricao} - {item.tipo_separacao ?? "-"} - {item.tipo_revogacao ?? "-"} - - - - - - - - - onEdit(item, true)} - > - - Editar - - - - - onDelete(item, true)} - > - - Remover - - - - - - - )})} - -
- ); -} diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/mockCensecTipoAto.ts b/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/mockCensecTipoAto.ts deleted file mode 100644 index 618c111..0000000 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/mockCensecTipoAto.ts +++ /dev/null @@ -1,251 +0,0 @@ -export default async function TCensecTipoAtoMockDeDados() { - return Promise.resolve({ - status: 200, - message: 'Dados localizados', - data: [ - { - censec_tipoato_id: 1, - censec_id: 2, - codigo: 1, - descricao: "Escritura", - situacao: "I", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 2, - censec_id: 1, - codigo: 2, - descricao: "Procuração", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 3, - censec_id: 1, - codigo: 3, - descricao: "Procuração para Fins Previdenciários", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 4, - censec_id: 1, - codigo: 5, - descricao: "Renúncia de Procuração", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 5, - censec_id: 1, - codigo: 6, - descricao: "Revogação de Procuração", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 6, - censec_id: 1, - codigo: 7, - descricao: "Substabelecimento", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 7, - censec_id: 1, - codigo: 8, - descricao: "Ata Notarial", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 8, - censec_id: 2, - codigo: 1, - descricao: "Separação", - situacao: "A", - tipo_separacao: "S", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 9, - censec_id: 2, - codigo: 2, - descricao: "Reconciliação", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 10, - censec_id: 2, - codigo: 3, - descricao: "Conversão de Separação em Divórcio", - situacao: "A", - tipo_separacao: "S", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 11, - censec_id: 2, - codigo: 4, - descricao: "Divórcio Direto", - situacao: "A", - tipo_separacao: "S", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 12, - censec_id: 2, - codigo: 5, - descricao: "Inventário", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 13, - censec_id: 2, - codigo: 6, - descricao: "Sobrepartilha", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 14, - censec_id: 2, - codigo: 7, - descricao: "Retificação", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 15, - censec_id: 3, - codigo: 1, - descricao: "Aditamento", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 16, - censec_id: 3, - codigo: 2, - descricao: "Cerrado", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 17, - censec_id: 3, - codigo: 3, - descricao: "Revogação", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "S" - }, - { - censec_tipoato_id: 18, - censec_id: 3, - codigo: 4, - descricao: "Testamento", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 19, - censec_id: 3, - codigo: 5, - descricao: "Testamento com Revogação", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 20, - censec_id: 3, - codigo: 6, - descricao: "Testamento sem Conteúdo Patrimonial", - situacao: "A", - tipo_separacao: "N", - tipo_revogacao: "N" - }, - { - censec_tipoato_id: 21, - censec_id: 9, - codigo: null, - descricao: "Atos Diversos", - situacao: "A", - tipo_separacao: null, - tipo_revogacao: null - }, - { - censec_tipoato_id: 204, - censec_id: 1, - codigo: 75, - descricao: "Conciliação", - situacao: "A", - tipo_separacao: null, - tipo_revogacao: null - }, - { - censec_tipoato_id: 208, - censec_id: 1, - codigo: 76, - descricao: "Mediação", - situacao: "A", - tipo_separacao: null, - tipo_revogacao: null - }, - { - censec_tipoato_id: 209, - censec_id: 1, - codigo: 8, - descricao: "Compra e Venda", - situacao: "A", - tipo_separacao: null, - tipo_revogacao: null - }, - { - censec_tipoato_id: 210, - censec_id: 1, - codigo: 1, - descricao: "Escritura", - situacao: "A", - tipo_separacao: null, - tipo_revogacao: null - }, - { - censec_tipoato_id: 211, - censec_id: 2, - codigo: 8, - descricao: "Nomeação de Inventariante", - situacao: "A", - tipo_separacao: null, - tipo_revogacao: null - }, - { - censec_tipoato_id: 212, - censec_id: 2, - codigo: 9, - descricao: "Partilha", - situacao: "A", - tipo_separacao: null, - tipo_revogacao: null - } - ] - }); -} diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoRemoveService.ts deleted file mode 100644 index 714c7f4..0000000 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoRemoveService.ts +++ /dev/null @@ -1,8 +0,0 @@ -import GTBProfissaoRemoveData from '../../_data/GTBProfissao/GTBProfissaoRemoveData'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; - -export default async function GTBProfissaoRemoveService(data: GTBProfissaoInterface) { - const response = await GTBProfissaoRemoveData(data); - - return response; -} diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoSaveService.ts deleted file mode 100644 index d3c4c17..0000000 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoSaveService.ts +++ /dev/null @@ -1,7 +0,0 @@ -import GTBProfissaoSaveData from '../../_data/GTBProfissao/GTBProfissaoSaveData'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; - -export default async function GTProfissaoSaveService(data: GTBProfissaoInterface) { - const response = await GTBProfissaoSaveData(data); - return response; -} diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensRemoveService.ts deleted file mode 100644 index 9e6feb2..0000000 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensRemoveService.ts +++ /dev/null @@ -1,8 +0,0 @@ -import GTBRegimeBensRemoveData from '../../_data/GTBRegimeBens/GTBRegimeBensRemoveData'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; - -export default async function GTBRegimeBensRemoveService(data: GTBRegimeBensInterface) { - const response = await GTBRegimeBensRemoveData(data); - - return response; -} diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaIndex.ts b/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaIndex.ts deleted file mode 100644 index 09563d1..0000000 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaIndex.ts +++ /dev/null @@ -1,7 +0,0 @@ -import TMinutaIndexData from '../../_data/TMinuta/TMinutaIndexData'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; - -export default async function TMinutaIndex() { - const response = await TMinutaIndexData(); - return response; -} diff --git a/src/app/(protected)/(cadastros)/cadastros/pessoas/complementos/page.tsx b/src/app/(protected)/(cadastros)/cadastros/pessoas/complementos/page.tsx deleted file mode 100644 index 15f662f..0000000 --- a/src/app/(protected)/(cadastros)/cadastros/pessoas/complementos/page.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { FileText, Heart, Briefcase, Scale, Link as LinkIcon, MapPin } from 'lucide-react'; -import { Card, CardContent } from '@/components/ui/card'; -import Link from 'next/link'; - -export default function CadastrosPage() { - const items = [ - { - title: 'Documentos', - description: 'Gerencie os tipos de documentos aceitos e suas configurações no sistema.', - icon: FileText, - }, - { - title: 'Estado Civil', - description: 'Cadastre e mantenha os diferentes estados civis utilizados nos registros.', - icon: Heart, - }, - { - title: 'Profissão', - description: 'Gerencie a lista de profissões para utilização em cadastros e registros.', - icon: Briefcase, - }, - { - title: 'Regime de Comunhão', - description: 'Defina os regimes de comunhão aplicáveis em matrimônios e registros civis.', - icon: Scale, - }, - { - title: 'Vínculo de Sinal Público', - description: - 'Controle e cadastre vínculos relacionados a sinais públicos para autenticações.', - icon: LinkIcon, - }, - { - title: 'Municípios', - description: 'Gerencie a base de municípios para utilização em endereços e cadastros.', - icon: MapPin, - }, - ]; - - return ( -
-
-
-

Complementos de Cadastro pessoal

-

- Gerencie os cadastros relacionados a regimes, como estado civil, regime de comunhão e - outras informações complementares necessárias para o registro de pessoas. -

-
-
-
- {items.map((item, key) => ( - - - - - - -

- {item.title} -

-

{item.description}

-
-
- - ))} -
-
- ); -} diff --git a/src/app/(protected)/(servicos)/servicos/page.tsx b/src/app/(protected)/(servicos)/servicos/page.tsx deleted file mode 100644 index dd59168..0000000 --- a/src/app/(protected)/(servicos)/servicos/page.tsx +++ /dev/null @@ -1,100 +0,0 @@ -'use client'; - -import { Card, CardAction, CardContent, CardDescription, CardTitle } from '@/components/ui/card'; -import { - BabyIcon, - CrossIcon, - FileCheckIcon, - FileTextIcon, - GavelIcon, - GlobeIcon, - HeartIcon, - PenIcon, - ScrollIcon, - UsersIcon, -} from 'lucide-react'; - -const services = [ - { - title: 'Registro de Nascimento', - description: - 'Emissão e registro de certidões de nascimento, garantindo a cidadania e identidade legal do recém-nascido.', - icon: BabyIcon, - }, - { - title: 'Registro de Casamento', - description: 'Processo completo para habilitação, registro e emissão da certidão de casamento.', - icon: HeartIcon, - }, - { - title: 'Registro de Óbito', - description: - 'Lavratura do registro de óbito e emissão da certidão correspondente para fins legais.', - icon: CrossIcon, - }, - { - title: 'Reconhecimento de Firma', - description: 'Autenticação da assinatura de documentos, garantindo sua validade jurídica.', - icon: PenIcon, - }, - { - title: 'Autenticação de Documentos', - description: 'Confirmação de que cópias estão de acordo com o documento original apresentado.', - icon: FileCheckIcon, - }, - { - title: 'Procurações', - description: - 'Elaboração e registro de procurações públicas para representação legal de pessoas físicas ou jurídicas.', - icon: ScrollIcon, - }, - { - title: 'Testamentos', - description: 'Lavratura e registro de testamentos públicos com segurança jurídica.', - icon: GavelIcon, - }, - { - title: 'Divórcio Extrajudicial', - description: - 'Formalização do divórcio por via administrativa, de forma rápida e sem processo judicial.', - icon: UsersIcon, - }, - { - title: 'Apostilamento de Documentos', - description: - 'Apostilamento conforme a Convenção da Haia para validade internacional de documentos.', - icon: GlobeIcon, - }, - { - title: 'Certidões e Segunda Via', - description: 'Emissão de segundas vias e certidões de nascimento, casamento e óbito.', - icon: FileTextIcon, - }, -]; - -export default function ServicosPage() { - return ( -
-
-

Bem-vindo(a)!

-

- Olá, Keven! É um prazer ter você conosco. -

-
-
- {services.map((item: any, index) => ( - - -
- -
- - {item.title} - {item.description} -
-
- ))} -
-
- ); -} diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 60b7305..650ebd9 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -83,47 +83,47 @@ const data = { items: [ { title: 'Reconhecimentos', - url: '/cadastros/reconhecimentos/', + url: '/administrativo/reconhecimentos/', }, { title: 'Andamentos', - url: '/cadastros/andamentos/', + url: '/administrativo/andamentos/', }, { title: 'Profissões', - url: '/cadastros/profissoes/', + url: '/administrativo/pessoas/profissoes/', }, { title: 'Regimes/Bens', - url: '/cadastros/regime-bens/', + url: '/administrativo/pessoas/regimes-bens/', }, { title: 'Tipos de Logradouros', - url: '/cadastros/tipo-logradouro', - }, - { - title: 'Bairro', - url: '/cadastros/bairro', + url: '/administrativo/imoveis/tipos-logradouro', }, { title: 'Estado Civil', - url: '/cadastros/estado-civil', + url: '/administrativo/pessoas/estados-civis', + }, + { + title: "Regimes/Comunhão", + url: "/administrativo/pessoas/regimes-comunhao/", }, { title: 'Tipo de Medida', - url: '/cadastros/medida-tipo', - }, - { - title: 'Pessoas', - url: '/cadastros/pessoas/complementos/', + url: '/administrativo/medidas/tipos', }, { title: 'Cidades', - url: '/cadastros/cidades/', + url: '/administrativo/cidades/', + }, + { + title: 'Bairro', + url: '/administrativo/bairros', }, { title: 'Minuta', - url: '/cadastros/minuta/', + url: '/administrativo/minutas/', }, { title: 'Minuta/Naturezas', @@ -131,23 +131,19 @@ const data = { }, { title: "Censec/Tipo do Ato", - url: "/cadastros/censec-tipoato" + url: "/administrativo/centrais/censec/tipos-atos" }, { title: "Censec/Qualidades", - url: "/administrativo/censec/qualidades" + url: "/administrativo/centrais/censec/qualidades" }, { title: 'Censec/Centrais', - url: '/cadastros/censec/', + url: '/administrativo/centrais/censec/centrais', }, { title: 'Censec/Natureza Litígio', - url: '/cadastros/censec-natureza-litigio', - }, - { - title: "Regimes/Comunhão", - url: "/cadastros/regime-comunhao/", + url: '/administrativo/centrais/censec/naturezas-litigios', }, { title: "Atos/Partes Tipos", diff --git a/src/components/login-form.tsx b/src/components/login-form.tsx index 5ce6fd0..ec4e8cf 100644 --- a/src/components/login-form.tsx +++ b/src/components/login-form.tsx @@ -6,13 +6,13 @@ import { Card, CardContent } from '@/components/ui/card'; import { Input } from '@/components/ui/input'; import z from 'zod'; import { zodResolver } from '@hookform/resolvers/zod'; -import GUsuarioLoginService from '@/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioLogin'; +import GUsuarioLoginService from '@/packages/administrativo/services/GUsuario/GUsuarioLogin'; import { useForm } from 'react-hook-form'; import { useState } from 'react'; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from './ui/form'; import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Button } from './ui/button'; -import { GUsuarioLoginSchema } from '@/app/(protected)/(administrativo)/_schemas/GUsuarioLoginSchema'; +import { GUsuarioLoginSchema } from '@/packages/administrativo/schemas/GUsuario/GUsuarioLoginSchema'; type FormValues = z.infer; diff --git a/src/components/nav-user.tsx b/src/components/nav-user.tsx index dfe7c20..43ea768 100644 --- a/src/components/nav-user.tsx +++ b/src/components/nav-user.tsx @@ -20,7 +20,7 @@ import { import GUsuarioAuthenticatedInterface from '@/shared/interfaces/GUsuarioAuthenticatedInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; -import { useGUsuarioLogoutHook } from '@/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioLogoutHook'; +import { useGUsuarioLogoutHook } from '@/packages/administrativo/hooks/GUsuario/useGUsuarioLogoutHook'; import { use, useCallback, useState } from 'react'; export function NavUser({ user }: { user: GUsuarioAuthenticatedInterface }) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_cidade/GCidadeForm.tsx b/src/packages/administrativo/components/GCidade/GCidadeForm.tsx similarity index 94% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_cidade/GCidadeForm.tsx rename to src/packages/administrativo/components/GCidade/GCidadeForm.tsx index 37142d0..df4a3f5 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_cidade/GCidadeForm.tsx +++ b/src/packages/administrativo/components/GCidade/GCidadeForm.tsx @@ -24,11 +24,11 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; -import { GCidadeSchema } from '../../_schemas/GCidadeSchema'; +import { GCidadeSchema } from '../../schemas/GCidade/GCidadeSchema'; import { useEffect } from 'react'; // Hook responsável em trazer todos os estados brasileiros -import { useGUfReadHook } from '../../_hooks/g_uf/useGUfReadHook'; +import { useGUfReadHook } from '@/packages/administrativo/hooks/GUF/useGUfReadHook'; import { Select, SelectContent, @@ -155,10 +155,10 @@ export default function GCidadeForm({ isOpen, data, onClose, onSave }: Props) { render={({ field }) => ( UF - field.onChange(val)} + > diff --git a/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx b/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx new file mode 100644 index 0000000..624aff9 --- /dev/null +++ b/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx @@ -0,0 +1,163 @@ +'use client'; + +import { useEffect, useState, useCallback } from 'react'; +import { Card, CardContent } from '@/components/ui/card'; + +import Loading from '@/shared/components/loading/loading'; +import GCidadeTable from '@/packages/administrativo/components/GCidade/GCidadeTable'; +import GCidadeForm from '@/packages/administrativo/components/GCidade/GCidadeForm'; + +import { useGCidadeReadHook } from '@/packages/administrativo/hooks/GCidade/useGCidadeReadHook'; +import { useGCidadeSaveHook } from '@/packages/administrativo/hooks/GCidade/useGCidadeSaveHook'; +import { useGCidadeRemoveHook } from '@/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook'; + +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; + +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; +import Header from '@/shared/components/structure/Header'; + +export default function GCidadeIndex() { + // Hooks para leitura e salvamento + const { gCidade, fetchGCidade } = useGCidadeReadHook(); + const { saveGCidade } = useGCidadeSaveHook(); + const { removeGCidade } = useGCidadeRemoveHook(); + + // Estados + const [selectedCidade, setSelectedCidade] = 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: GCidadeInterface | null) => { + setSelectedCidade(data); + setIsFormOpen(true); + }, []); + + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback((_: null, __: boolean) => { + setSelectedCidade(null); + setIsFormOpen(false); + }, []); + + /** + * Salva os dados do formulário + */ + const handleSave = useCallback(async (formData: GCidadeInterface) => { + + + // Aguarda salvar o registro + await saveGCidade(formData); + + // Atualiza a lista de dados + fetchGCidade(); + }, + [saveGCidade, fetchGCidade], + ); + + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: GCidadeInterface) => { + // 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 removeGCidade(itemToDelete); + + // Atualiza a lista + await fetchGCidade(); + + // Limpa o item selecionado + setItemToDelete(null); + + // Fecha o modal + handleCancel(); + }, [itemToDelete, fetchGCidade, handleCancel]); + + /** + * Busca inicial dos dados + */ + useEffect(() => { + fetchGCidade(); + }, []); + + /** + * Tela de loading enquanto carrega os dados + */ + if (!gCidade) { + return ; + } + + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + + {/* Tabela de andamentos */} + + + + + + + {/* Modal de confirmação */} + + + {/* Formulário de criação/edição */} + +
+ ); + 4; +} diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_cidade/GCidadeTable.tsx b/src/packages/administrativo/components/GCidade/GCidadeTable.tsx similarity index 98% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_cidade/GCidadeTable.tsx rename to src/packages/administrativo/components/GCidade/GCidadeTable.tsx index f7980e0..e1675b0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_cidade/GCidadeTable.tsx +++ b/src/packages/administrativo/components/GCidade/GCidadeTable.tsx @@ -19,7 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import GCidadeInterface from '../../_interfaces/GCidadeInterface'; +import GCidadeInterface from '../../interfaces/GCidade/GCidadeInterface'; // Tipagem das props do componente da tabela interface GCidadeTableProps { diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoForm.tsx b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoForm.tsx similarity index 95% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoForm.tsx rename to src/packages/administrativo/components/GMedidaTipo/GMedidaTipoForm.tsx index 5d7b2ac..a879486 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoForm.tsx +++ b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoForm.tsx @@ -25,8 +25,8 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; -import { GMedidaTipoSchema } from '../../_schemas/GMedidaTipoSchema'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; +import { GMedidaTipoSchema } from '../../schemas/GMedidaTipo/GMedidaTipoSchema'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_medidatipo)/medida-tipo/page.tsx b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex.tsx similarity index 88% rename from src/app/(protected)/(cadastros)/cadastros/(g_medidatipo)/medida-tipo/page.tsx rename to src/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex.tsx index 071daec..b4d7889 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_medidatipo)/medida-tipo/page.tsx +++ b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex.tsx @@ -8,14 +8,14 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; 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'; +import GMedidaTipoTable from './GMedidaTipoTable'; +import GMedidaTipoForm from './GMedidaTipoForm'; -import { useGMedidaTipoReadHook } from '../../_hooks/g_medidatipo/useGMedidaTipoReadHook'; -import { useGMedidaTipoSaveHook } from '../../_hooks/g_medidatipo/useGMedidaTipoSaveHook'; -import { useGMedidaTipoRemoveHook } from '../../_hooks/g_medidatipo/useGMedidaTipoRemoveHook'; +import { useGMedidaTipoReadHook } from '../../hooks/GMedidaTipo/useGMedidaTipoReadHook'; +import { useGMedidaTipoSaveHook } from '../../hooks/GMedidaTipo/useGMedidaTipoSaveHook'; +import { useGMedidaTipoRemoveHook } from '../../hooks/GMedidaTipo/useGMedidaTipoRemoveHook'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; const initialMedidaTipo: GMedidaTipoInterface = { @@ -24,7 +24,7 @@ const initialMedidaTipo: GMedidaTipoInterface = { descricao: '', }; -export default function GMedidaTipoPage() { +export default function GMedidaTipoIndex() { // Controle de exibição de respostas const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoTable.tsx b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoTable.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoTable.tsx rename to src/packages/administrativo/components/GMedidaTipo/GMedidaTipoTable.tsx index 61c6076..8184d50 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_medidatipo/GMedidaTipoTable.tsx +++ b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoTable.tsx @@ -18,7 +18,7 @@ import { TableRow, } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; interface GMedidaTipoTableProps { data: GMedidaTipoInterface[]; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroForm.tsx b/src/packages/administrativo/components/GTBBairro/GTBBairroForm.tsx similarity index 98% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroForm.tsx rename to src/packages/administrativo/components/GTBBairro/GTBBairroForm.tsx index 2d11f64..2d2aaea 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroForm.tsx +++ b/src/packages/administrativo/components/GTBBairro/GTBBairroForm.tsx @@ -27,7 +27,7 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { GTBBairroSchema } from '../../_schemas/GTBBairroSchema'; +import { GTBBairroSchema } from '../../schemas/GTBBairro/GTBBairroSchema'; import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_bairro)/bairro/page.tsx b/src/packages/administrativo/components/GTBBairro/GTBBairroIndex.tsx similarity index 89% rename from src/app/(protected)/(cadastros)/cadastros/(g_tb_bairro)/bairro/page.tsx rename to src/packages/administrativo/components/GTBBairro/GTBBairroIndex.tsx index 9fb2583..c33766a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_bairro)/bairro/page.tsx +++ b/src/packages/administrativo/components/GTBBairro/GTBBairroIndex.tsx @@ -8,14 +8,14 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; 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'; +import GTBBairroTable from './GTBBairroTable'; +import GTBBairroForm from './GTBBairroForm'; -import { useGTBBairroReadHook } from '../../_hooks/g_tb_bairro/useGTBBairroReadHook'; -import { useGTBBairroSaveHook } from '../../_hooks/g_tb_bairro/useGTBBairroSaveHook'; -import { useGTBBairroRemoveHook } from '../../_hooks/g_tb_bairro/useGTBBairroRemoveHook'; +import { useGTBBairroReadHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook'; +import { useGTBBairroSaveHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook'; +import { useGTBBairroRemoveHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; +import { GTBBairroInterface } from '../../interfaces/GTBBairro/GTBBairroInterface'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; const initialBairro: GTBBairroInterface = { @@ -25,7 +25,7 @@ const initialBairro: GTBBairroInterface = { situacao: SituacoesEnum.A, }; -export default function GTBBairroPage() { +export default function GTBBairroIndex() { // Controle de exibição de respostas const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/components/GTBBairro/GTBBairroSelect.tsx b/src/packages/administrativo/components/GTBBairro/GTBBairroSelect.tsx index adfdb6c..28e5dd1 100644 --- a/src/packages/administrativo/components/GTBBairro/GTBBairroSelect.tsx +++ b/src/packages/administrativo/components/GTBBairro/GTBBairroSelect.tsx @@ -15,8 +15,8 @@ import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover import { cn } from '@/lib/utils'; import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; -import { useGTBBairroReadHook } from '@/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook'; -import GTBairroSelectInterface from './GTBairroSelectInterface'; +import { useGTBBairroReadHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook'; +import GTBairroSelectInterface from '../../interfaces/GTBBairro/GTBairroSelectInterface'; export default function GTBBairroSelect({ field }: GTBairroSelectInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroTable.tsx b/src/packages/administrativo/components/GTBBairro/GTBBairroTable.tsx similarity index 97% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroTable.tsx rename to src/packages/administrativo/components/GTBBairro/GTBBairroTable.tsx index 63bee51..57d1b3e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_bairro/GTBBairroTable.tsx +++ b/src/packages/administrativo/components/GTBBairro/GTBBairroTable.tsx @@ -18,7 +18,7 @@ import { TableRow, } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; +import { GTBBairroInterface } from '../../interfaces/GTBBairro/GTBBairroInterface'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; interface GTBBairroTableProps { diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilForm.tsx b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilForm.tsx similarity index 95% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilForm.tsx rename to src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilForm.tsx index 50c9723..be770fc 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilForm.tsx +++ b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilForm.tsx @@ -28,8 +28,8 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { GTBEstadoCivilSchema } from '../../_schemas/GTBEstadoCivilSchema'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; +import { GTBEstadoCivilSchema } from '../../schemas/GTBEstadoCivil/GTBEstadoCivilSchema'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_estadocivil)/estado-civil/page.tsx b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex.tsx similarity index 87% rename from src/app/(protected)/(cadastros)/cadastros/(g_tb_estadocivil)/estado-civil/page.tsx rename to src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex.tsx index da1bc9c..ab233c6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_estadocivil)/estado-civil/page.tsx +++ b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex.tsx @@ -7,14 +7,14 @@ import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDi 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'; +import GTBEstadoCivilTable from './GTBEstadoCivilTable'; +import GTBEstadoCivilForm from './GTBEstadoCivilForm'; -import { useGTBEstadoCivilReadHook } from '../../_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook'; -import { useGTBEstadoCivilSaveHook } from '../../_hooks/g_tb_estadocivil/useGTBEstadoCivilSaveHook'; -import { useGTBEstadoCivilRemoveHook } from '../../_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook'; +import { useGTBEstadoCivilReadHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook'; +import { useGTBEstadoCivilSaveHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook'; +import { useGTBEstadoCivilRemoveHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; import { useResponse } from '@/shared/components/response/ResponseContext'; const initalEstadoCivil: GTBEstadoCivilInterface = { @@ -24,7 +24,7 @@ const initalEstadoCivil: GTBEstadoCivilInterface = { situacao: 'A', }; -export default function TBEstadoCivilPage() { +export default function GTBEstadoCivilIndex() { // Controle de exibição de respostas const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilTable.tsx b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilTable.tsx similarity index 97% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilTable.tsx rename to src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilTable.tsx index e95716d..c992568 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_estadocivil/GTBEstadoCivilTable.tsx +++ b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilTable.tsx @@ -18,7 +18,7 @@ import { TableRow, } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; interface TBEstadoCivilTableProps { data: GTBEstadoCivilInterface[]; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_profissao/GTBProfissaoForm.tsx b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoForm.tsx similarity index 97% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_profissao/GTBProfissaoForm.tsx rename to src/packages/administrativo/components/GTBProfissao/GTBProfissaoForm.tsx index 27b8233..b343951 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_profissao/GTBProfissaoForm.tsx +++ b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoForm.tsx @@ -27,7 +27,7 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { GTBProfissaoSchema } from '../../_schemas/GTBProfissaoSchema'; +import { GTBProfissaoSchema } from '../../schemas/GTBProfissao/GTBProfissaoSchema'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_profissao)/profissoes/page.tsx b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex.tsx similarity index 87% rename from src/app/(protected)/(cadastros)/cadastros/(g_tb_profissao)/profissoes/page.tsx rename to src/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex.tsx index c19269c..8b806e4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_profissao)/profissoes/page.tsx +++ b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex.tsx @@ -4,20 +4,20 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; import Loading from '@/shared/components/loading/loading'; -import GTBProfissaoTable from '../../_components/g_tb_profissao/GTBProfissaoTable'; -import GTBProfissaoForm from '../../_components/g_tb_profissao/GTBProfissaoForm'; +import GTBProfissaoTable from './GTBProfissaoTable'; +import GTBProfissaoForm from './GTBProfissaoForm'; -import { useGTBProfissaoReadHook } from '../../_hooks/g_tb_profissao/useGTBProfissaoReadHook'; -import { useGTBProfissaoSaveHook } from '../../_hooks/g_tb_profissao/useGTBProfissaoSaveHook'; -import { useGTBProfissaoRemoveHook } from '../../_hooks/g_tb_profissao/useGTBProfissaoRemoveHook'; +import { useGTBProfissaoReadHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook'; +import { useGTBProfissaoSaveHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook'; +import { useGTBProfissaoRemoveHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; +import GTBProfissaoInterface from '../../interfaces/GTBProfissao/GTBProfissaoInterface'; import Header from '@/shared/components/structure/Header'; -export default function TTBAndamentoServico() { +export default function GTBProfissaoIndex() { // Hooks para leitura e salvamento const { gTBProfissao, fetchGTBProfissao } = useGTBProfissaoReadHook(); const { saveGTBProfissao } = useGTBProfissaoSaveHook(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_profissao/GTBProfissaoTable.tsx b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoTable.tsx similarity index 97% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_profissao/GTBProfissaoTable.tsx rename to src/packages/administrativo/components/GTBProfissao/GTBProfissaoTable.tsx index 1540d41..2b525b9 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_profissao/GTBProfissaoTable.tsx +++ b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoTable.tsx @@ -19,7 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; +import GTBProfissaoInterface from '../../interfaces/GTBProfissao/GTBProfissaoInterface'; interface GTBProfissaoTableProps { data: GTBProfissaoInterface[]; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimebens/GTBRegimeBensForm.tsx b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm.tsx similarity index 97% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimebens/GTBRegimeBensForm.tsx rename to src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm.tsx index 53862f1..0abe758 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimebens/GTBRegimeBensForm.tsx +++ b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm.tsx @@ -26,7 +26,7 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { GTBRegimeBensSchema } from '../../_schemas/GTBRegimeBensSchema'; +import { GTBRegimeBensSchema } from '@/packages/administrativo/schemas/GTBRegimeBens/GTBRegimeBensSchema'; import { useEffect } from 'react'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimebens)/regime-bens/page.tsx b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex.tsx similarity index 86% rename from src/app/(protected)/(cadastros)/cadastros/(g_tb_regimebens)/regime-bens/page.tsx rename to src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex.tsx index 10c36f7..917741b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimebens)/regime-bens/page.tsx +++ b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex.tsx @@ -4,20 +4,20 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; import Loading from '@/shared/components/loading/loading'; -import GTBRegimeBensTable from '../../_components/g_tb_regimebens/GTBRegimeBensTable'; -import GTBRegimeBensForm from '../../_components/g_tb_regimebens/GTBRegimeBensForm'; +import GTBRegimeBensTable from '@/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable'; +import GTBRegimeBensForm from '@/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm'; -import { useGTBRegimeBensReadHook } from '../../_hooks/g_tb_regimebens/useGTBRegimeBensReadHook'; -import { useGTBRegimeBensSaveHook } from '../../_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook'; -import { useGTBRegimeBensRemoveHook } from '../../_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook'; +import { useGTBRegimeBensReadHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensReadHook'; +import { useGTBRegimeBensSaveHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensSaveHook'; +import { useGTBRegimeBensRemoveHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; import Header from '@/shared/components/structure/Header'; -export default function TTBAndamentoServico() { +export default function GTBRegimeBensIndex() { // Hooks para leitura e salvamento const { gTBRegimeBens, fetchGTBRegimeBens } = useGTBRegimeBensReadHook(); const { saveGTBRegimeComunhao } = useGTBRegimeBensSaveHook(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimebens/GTBRegimeBensTable.tsx b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimebens/GTBRegimeBensTable.tsx rename to src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable.tsx index 52ae171..e0914dd 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimebens/GTBRegimeBensTable.tsx +++ b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable.tsx @@ -19,7 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; +import GTBRegimeBensInterface from '@/packages/administrativo/interfaces/GTBRegimeBens/GTBRegimeBensInterface'; interface GTBRegimeBensTableProps { data: GTBRegimeBensInterface[]; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimecomunhao/GTBRegimeComunhaoForm.tsx b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoForm.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimecomunhao/GTBRegimeComunhaoForm.tsx rename to src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoForm.tsx index 2c8bd13..638222e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimecomunhao/GTBRegimeComunhaoForm.tsx +++ b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoForm.tsx @@ -27,7 +27,7 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { GTBRegimeComunhaoSchema } from '../../_schemas/GTBRegimeComunhaoSchema'; +import { GTBRegimeComunhaoSchema } from '../../schemas/GTBRegimeComunhao/GTBRegimeComunhaoSchema'; import { Select, SelectContent, @@ -35,7 +35,7 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select'; -import { useGTBRegimeBensReadHook } from '../../_hooks/g_tb_regimebens/useGTBRegimeBensReadHook'; +import { useGTBRegimeBensReadHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensReadHook'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimecomunhao)/regime-comunhao/page.tsx b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex.tsx similarity index 86% rename from src/app/(protected)/(cadastros)/cadastros/(g_tb_regimecomunhao)/regime-comunhao/page.tsx rename to src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex.tsx index 5de6c1c..5bcd85c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_regimecomunhao)/regime-comunhao/page.tsx +++ b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex.tsx @@ -4,20 +4,20 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; import Loading from '@/shared/components/loading/loading'; -import GTBRegimeComunhaoTable from '../../_components/g_tb_regimecomunhao/GTBRegimeComunhaoTable'; -import GTBRegimeComunhaoForm from '../../_components/g_tb_regimecomunhao/GTBRegimeComunhaoForm'; +import GTBRegimeComunhaoTable from './GTBRegimeComunhaoTable'; +import GTBRegimeComunhaoForm from './GTBRegimeComunhaoForm'; -import { useGTBRegimeComunhaoReadHook } from '../../_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook'; -import { useGTBRegimeComunhaoSaveHook } from '../../_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook'; -import { useGTBRegimeComunhaoRemoveHook } from '../../_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook'; +import { useGTBRegimeComunhaoReadHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook'; +import { useGTBRegimeComunhaoSaveHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook'; +import { useGTBRegimeComunhaoRemoveHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; import Header from '@/shared/components/structure/Header'; -export default function TTBAndamentoServico() { +export default function GTBRegimeComunhaoIndex() { // Hooks para leitura e salvamento const { gTBRegimeComunhao, fetchGTBRegimeComunhao } = useGTBRegimeComunhaoReadHook(); const { saveGTBRegimeComunhao } = useGTBRegimeComunhaoSaveHook(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimecomunhao/GTBRegimeComunhaoTable.tsx b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoTable.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimecomunhao/GTBRegimeComunhaoTable.tsx rename to src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoTable.tsx index d84f92f..299b6c8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_regimecomunhao/GTBRegimeComunhaoTable.tsx +++ b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoTable.tsx @@ -19,7 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; interface GTBRegimeComunhaoTableProps { data: GTBRegimeComunhaoInterface[]; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroForm.tsx b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroForm.tsx similarity index 95% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroForm.tsx rename to src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroForm.tsx index 08ba132..3fbf79a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroForm.tsx +++ b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroForm.tsx @@ -29,8 +29,8 @@ import { Label } from '@/components/ui/label'; import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; -import { GTBTipoLogradouroSchema } from '../../_schemas/GTBTipoLogradouroSchema'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroSchema } from '../../schemas/GTBTipoLogradouro/GTBTipoLogradouroSchema'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/(g_tb_tipologradouro)/tipo-logradouro/page.tsx b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex.tsx similarity index 87% rename from src/app/(protected)/(cadastros)/cadastros/(g_tb_tipologradouro)/tipo-logradouro/page.tsx rename to src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex.tsx index 8a198b4..fe6a770 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(g_tb_tipologradouro)/tipo-logradouro/page.tsx +++ b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex.tsx @@ -7,18 +7,18 @@ import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDi 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'; +import GTBTipoLogradouroTable from './GTBTipoLogradouroTable'; +import GTBTipoLogradouroForm from './GTBTipoLogradouroForm'; -import { useGTBTipoLogradouroReadHook } from '../../_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook'; -import { useGTBTipoLogradouroSaveHook } from '../../_hooks/g_tb_tipologradouro/useGTBTipoLogradouroSaveHook'; -import { useGTBTipoLogradouroRemoveHook } from '../../_hooks/g_tb_tipologradouro/useGTBTipoLogradouroRemoveHook'; +import { useGTBTipoLogradouroReadHook } from '../../hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook'; +import { useGTBTipoLogradouroSaveHook } from '../../hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook'; +import { useGTBTipoLogradouroRemoveHook } from '../../hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; import { useResponse } from '@/shared/components/response/ResponseContext'; -export default function TTBAndamentoServico() { +export default function GTBTipoLogradouroIndex() { // Controle de exibição de respostas const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroTable.tsx b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroTable.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroTable.tsx rename to src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroTable.tsx index d016dba..cf69a83 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/g_tb_tipologradouro/GTBTipoLogradouroTable.tsx +++ b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroTable.tsx @@ -18,7 +18,7 @@ import { TableRow, } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; interface GTBTipoLogradouroTableProps { data: GTBTipoLogradouroInterface[]; diff --git a/src/packages/administrativo/components/GUF/GUFSelec.tsx b/src/packages/administrativo/components/GUF/GUFSelec.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecForm.tsx b/src/packages/administrativo/components/TCensec/TCensecForm.tsx similarity index 97% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecForm.tsx rename to src/packages/administrativo/components/TCensec/TCensecForm.tsx index 28bee9c..66dd4d4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecForm.tsx +++ b/src/packages/administrativo/components/TCensec/TCensecForm.tsx @@ -27,7 +27,7 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { TCensecSchema } from '../../_schemas/TCensecSchema'; +import { TCensecSchema } from '@/packages/administrativo/schemas/TCensec/TCensecSchema'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_censec)/censec/page.tsx b/src/packages/administrativo/components/TCensec/TCensecIndex.tsx similarity index 89% rename from src/app/(protected)/(cadastros)/cadastros/(t_censec)/censec/page.tsx rename to src/packages/administrativo/components/TCensec/TCensecIndex.tsx index e9235b8..17f531d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_censec)/censec/page.tsx +++ b/src/packages/administrativo/components/TCensec/TCensecIndex.tsx @@ -4,20 +4,20 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; import Loading from '@/shared/components/loading/loading'; -import TCensecTable from '../../_components/t_censec/TCensecTable'; -import TCensecForm from '../../_components/t_censec/TCensecForm'; +import TCensecTable from './TCensecTable'; +import TCensecForm from './TCensecForm'; -import { useTCensecReadHook } from '../../_hooks/t_censec/useTCensecReadHook'; -import { useTCensecSaveHook } from '../../_hooks/t_censec/useTCensecSaveHook'; -import { useTCensecDeleteHook } from '../../_hooks/t_censec/useTCensecDeleteHook'; +import { useTCensecReadHook } from '../../hooks/TCensec/useTCensecReadHook'; +import { useTCensecSaveHook } from '../../hooks/TCensec/useTCensecSaveHook'; +import { useTCensecDeleteHook } from '../../hooks/TCensec/useTCensecDeleteHook'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; import Header from '@/shared/components/structure/Header'; -export default function TTBAndamentoServico() { +export default function TCensecIndex() { // Controle de estado do botão const [buttonIsLoading, setButtonIsLoading] = useState(false); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecTable.tsx b/src/packages/administrativo/components/TCensec/TCensecTable.tsx similarity index 97% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecTable.tsx rename to src/packages/administrativo/components/TCensec/TCensecTable.tsx index b2dd8e5..3600d80 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec/TCensecTable.tsx +++ b/src/packages/administrativo/components/TCensec/TCensecTable.tsx @@ -19,7 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; +import TCensecInterface from '@/packages/administrativo/interfaces/TCensec//TCensecInterface'; interface TCensecTableProps { data: TCensecInterface[]; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioForm.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx rename to src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioForm.tsx index fefa2c8..7142a5d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioForm.tsx +++ b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioForm.tsx @@ -28,7 +28,7 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { TCensecNaturezaLitigioSchema } from '../../_schemas/TCensecNaturezaLitigioSchema'; +import { TCensecNaturezaLitigioSchema } from '@/packages/administrativo/schemas/TCensecNaturezaLitigio/TCensecNaturezaLitigioSchema'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_censecnaturezalitigio)/censec-natureza-litigio/page.tsx b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex.tsx similarity index 85% rename from src/app/(protected)/(cadastros)/cadastros/(t_censecnaturezalitigio)/censec-natureza-litigio/page.tsx rename to src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex.tsx index 0e8b588..3a5cbf0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_censecnaturezalitigio)/censec-natureza-litigio/page.tsx +++ b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex.tsx @@ -9,14 +9,14 @@ 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'; +import TCensecNaturezaLitigioTable from './TCensecNaturezaLitigioTable'; +import TCensecNaturezaLitigioForm from './TCensecNaturezaLitigioForm'; -import { useTCensecNaturezaLitigioReadHook } from '../../_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioReadHook'; -import { useTCensecNaturezaLitigioSaveHook } from '../../_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioSaveHook'; -import { useTCensecNaturezaLitigioRemoveHook } from '../../_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook'; +import { useTCensecNaturezaLitigioReadHook } from '@/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook'; +import { useTCensecNaturezaLitigioSaveHook } from '@/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook'; +import { useTCensecNaturezaLitigioRemoveHook } from '@/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; const initialCensecNaturezaLitigio: TCensecNaturezaLitigioInterface = { @@ -25,7 +25,7 @@ const initialCensecNaturezaLitigio: TCensecNaturezaLitigioInterface = { situacao: SituacoesEnum.A, }; -export default function TCensecNaturezaLitigioPage() { +export default function TCensecNaturezaLitigioIndex() { // Controle de exibição de respostas const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioTable.tsx b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioTable.tsx similarity index 95% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioTable.tsx rename to src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioTable.tsx index d51e770..768d618 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censecnaturezalitigio/TCensecNaturezaLitigioTable.tsx +++ b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioTable.tsx @@ -18,7 +18,7 @@ import { TableRow, } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; interface TCensecNaturezaLitigioTableProps { diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx similarity index 98% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx rename to src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx index 45aec36..ab86e50 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_censec_tipoato/TCensecTipoAtoForm.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx @@ -25,8 +25,8 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; -import { TCensecTipoAtoSchema } from "../../_schemas/TCensecTipoAtoSchema"; -import TCensecInterface from "../../_interfaces/TCensecInterface"; +import { TCensecTipoAtoSchema } from "../../schemas/TCensecTipoAto/TCensecTipoAtoSchema"; +import TCensecInterface from "../../interfaces/TCensec/TCensecInterface"; import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; import SituacoesSelect from "@/shared/components/situacoes/SituacoesSelect"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_censec_tipoato)/censec-tipoato/page.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx similarity index 85% rename from src/app/(protected)/(cadastros)/cadastros/(t_censec_tipoato)/censec-tipoato/page.tsx rename to src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx index 92f62af..3719dd7 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_censec_tipoato)/censec-tipoato/page.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx @@ -8,15 +8,15 @@ 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"; +import TCensecTipoAtoTable from "./TCensecTipoAtoTable"; +import TCensecTipoAtoForm from "./TCensecTipoAtoForm"; -import { useTCensecTipoAtoReadHook } from "../../_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook"; -import { useTCensecTipoAtoSaveHook } from "../../_hooks/t_censec_tipoato/useTCensecTipoAtoSaveHook"; -import { useTCensecTipoAtoRemoveHook } from "../../_hooks/t_censec_tipoato/useTCensecTipoAtoRemoveHook"; -import { useTCensecReadHook } from "../../_hooks/t_censec/useTCensecReadHook"; +import { useTCensecTipoAtoReadHook } from "../../hooks/TCensecTipoAto/useTCensecTipoAtoReadHook"; +import { useTCensecTipoAtoSaveHook } from "../../hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook"; +import { useTCensecTipoAtoRemoveHook } from "../../hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook"; +import { useTCensecReadHook } from "../../hooks/TCensec/useTCensecReadHook"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; // Estado inicial para criação @@ -30,7 +30,7 @@ const initialTCensecTipoAto: TCensecTipoAtoInterface = { tipo_revogacao: null, }; -export default function TCensecTipoAtoPage() { +export default function TCensecTipoAtoIndex() { // Hooks para leitura, salvamento e remoção const { tCensecTipoAto, fetchTCensecTipoAto } = useTCensecTipoAtoReadHook(); const { saveTCensecTipoAto } = useTCensecTipoAtoSaveHook(); diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx index bcf5ab6..3501d8e 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx @@ -15,7 +15,7 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover import { cn } from "@/lib/utils"; import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; import GetCapitalize from "@/shared/actions/text/GetCapitalize"; -import { useTCensecTipoAtoReadHook } from "@/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook"; +import { useTCensecTipoAtoReadHook } from "@/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook"; export default function TCensecTipoAtoSelect({ field }: any) { const [open, setOpen] = React.useState(false); diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx new file mode 100644 index 0000000..a615121 --- /dev/null +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx @@ -0,0 +1,128 @@ +'use client'; + +import { Button } from "@/components/ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger +} from "@/components/ui/dropdown-menu"; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow +} from "@/components/ui/table"; +import { EllipsisIcon, PencilIcon, Trash2Icon } from "lucide-react"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; +import TCensecInterface from "../../interfaces/TCensec/TCensecInterface"; + +interface TCensecTipoAtoTableProps { + data: TCensecTipoAtoInterface[]; + tCensec: TCensecInterface[]; + onEdit: (item: TCensecTipoAtoInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TCensecTipoAtoInterface, isEditingFormStatus: boolean) => void; +} + +function StatusBadge({ situacao }: { situacao: string }) { + const isActive = situacao === "A"; + + const baseClasses = + "text-xs font-medium px-2.5 py-0.5 rounded-sm me-2"; + + const activeClasses = + "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300"; + + const inactiveClasses = + "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300"; + + return ( + + {isActive ? "Ativo" : "Inativo"} + + ); +} + +export default function TCensecTipoAtoTable({ + data, + tCensec, + onEdit, + onDelete +}: TCensecTipoAtoTableProps) { + return ( + + + + # + Situação + Central do CENSEC + {/*Código*/} + Descrição + Separação + Revogação + Ações + + + + + {data.map((item) => { + const censecDesc = tCensec.find(c => c.censec_id === item.censec_id)?.descricao || "N/A" + return ( + + + {item.censec_tipoato_id} + + + + + {censecDesc} + {/*{item.codigo ?? "-"}*/} + {item.descricao} + {item.tipo_separacao ?? "-"} + {item.tipo_revogacao ?? "-"} + + + + + + + + + onEdit(item, true)} + > + + Editar + + + + + onDelete(item, true)} + > + + Remover + + + + + + + ) + })} + +
+ ); +} diff --git a/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx b/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx index 4f72661..86e6fc5 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx @@ -15,7 +15,7 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover import { cn } from "@/lib/utils"; import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; import GetCapitalize from "@/shared/actions/text/GetCapitalize"; -import { useGTBTipoLogradouroReadHook } from "@/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook"; +import { useGTBTipoLogradouroReadHook } from "@/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook"; export default function TImovelTipoLogradouroSelect({ field }: any) { const [open, setOpen] = React.useState(false); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_minuta/TMinutaForm.tsx b/src/packages/administrativo/components/TMinuta/TMinutaForm.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_minuta/TMinutaForm.tsx rename to src/packages/administrativo/components/TMinuta/TMinutaForm.tsx index dbcd1f7..021d921 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_minuta/TMinutaForm.tsx +++ b/src/packages/administrativo/components/TMinuta/TMinutaForm.tsx @@ -28,8 +28,8 @@ import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import MainEditor from '@/components/MainEditor'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; -import { TMinutaSchema } from '../../_schemas/TMinutaSchema'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; +import { TMinutaSchema } from '../../schemas/TMinuta/TMinutaSchema'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_minuta/TMinutaTable.tsx b/src/packages/administrativo/components/TMinuta/TMinutaTable.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_minuta/TMinutaTable.tsx rename to src/packages/administrativo/components/TMinuta/TMinutaTable.tsx index 58af769..77a3926 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_minuta/TMinutaTable.tsx +++ b/src/packages/administrativo/components/TMinuta/TMinutaTable.tsx @@ -19,7 +19,7 @@ import { TableRow, } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; interface TMinutaTableProps { data: TMinutaInterface[]; diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx index 4cd8661..92fd7f6 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx @@ -32,10 +32,10 @@ import { } 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 { useGTBEstadoCivilReadHook } from '../../../hooks/GTBEstadoCivil/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 { useGTBRegimeComunhaoReadHook } from '../../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook'; +import { useGTBProfissaoReadHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { Command, diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_tb_andamentoservico/TTBAndamentoServicoForm.tsx b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoForm.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_tb_andamentoservico/TTBAndamentoServicoForm.tsx rename to src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoForm.tsx index 3aebba7..fc97b91 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_tb_andamentoservico/TTBAndamentoServicoForm.tsx +++ b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoForm.tsx @@ -34,8 +34,8 @@ import { SelectValue, } from '@/components/ui/select'; -import { TTBAndamentoServicoSchema } from '../../_schemas/TTBAndamentoServicoSchema'; -import { tipoEnum } from '../../_interfaces/TTBAndamentoServicoInterface'; +import { TTBAndamentoServicoSchema } from '../../schemas/TTBAndamentoServico/TTBAndamentoServicoSchema'; +import { tipoEnum } from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_tb_andamentoservico)/andamentos/page.tsx b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex.tsx similarity index 85% rename from src/app/(protected)/(cadastros)/cadastros/(t_tb_andamentoservico)/andamentos/page.tsx rename to src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex.tsx index 8ac3997..bb23196 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_tb_andamentoservico)/andamentos/page.tsx +++ b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex.tsx @@ -4,20 +4,20 @@ import { useEffect, useState, useCallback } from 'react'; import { Card, CardContent } from '@/components/ui/card'; import Loading from '@/shared/components/loading/loading'; -import TTBAndamentoServicoTable from '../../_components/t_tb_andamentoservico/TTBAndamentoServicoTable'; -import TTBAndamentoServicoForm from '../../_components/t_tb_andamentoservico/TTBAndamentoServicoForm'; +import TTBAndamentoServicoTable from './TTBAndamentoServicoTable'; +import TTBAndamentoServicoForm from './TTBAndamentoServicoForm'; -import { useTTBAndamentoServicoReadHook } from '../../_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook'; -import { useTTBAndamentoServicoSaveHook } from '../../_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook'; +import { useTTBAndamentoServicoReadHook } from '@/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook'; +import { useTTBAndamentoServicoSaveHook } from '@/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook'; 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 TTBAndamentoServicoInterface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; +import { useTTBAndamentoServicoDeleteHook } from '@/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook'; import Header from '@/shared/components/structure/Header'; -export default function TTBAndamentoServico() { +export default function TTBAndamentoServicoIndex() { // Hooks para leitura e salvamento const { tTBAndamentosServicos, fetchTTBAndamentoServico } = useTTBAndamentoServicoReadHook(); const { saveTTBAndamentoServico } = useTTBAndamentoServicoSaveHook(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_tb_andamentoservico/TTBAndamentoServicoTable.tsx b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoTable.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_tb_andamentoservico/TTBAndamentoServicoTable.tsx rename to src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoTable.tsx index 8576a12..e346ed4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_tb_andamentoservico/TTBAndamentoServicoTable.tsx +++ b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoTable.tsx @@ -19,7 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; +import TTBAndamentoServicoInteface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; interface TTBAndamentoServicoTableProps { data: TTBAndamentoServicoInteface[]; diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_tb_reconhecimentotipo/TTBReconhecimentoTipoForm.tsx b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoForm.tsx similarity index 94% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_tb_reconhecimentotipo/TTBReconhecimentoTipoForm.tsx rename to src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoForm.tsx index 1d5a603..0042b1a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_tb_reconhecimentotipo/TTBReconhecimentoTipoForm.tsx +++ b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoForm.tsx @@ -27,8 +27,8 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { TTBReconhecimentoTipoSchema } from '../../_schemas/TTBReconhecimentoTipoSchema'; -import { situacaoEnum } from '../../_interfaces/TTBReconhecimentoTipoInterface'; +import { TTBReconhecimentoTipoSchema } from '../../schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema'; +import { situacaoEnum } from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; type FormValues = z.infer; diff --git a/src/app/(protected)/(cadastros)/cadastros/(t_tb_reconhecimentotipo)/reconhecimentos/page.tsx b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex.tsx similarity index 85% rename from src/app/(protected)/(cadastros)/cadastros/(t_tb_reconhecimentotipo)/reconhecimentos/page.tsx rename to src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex.tsx index 79581d6..114cece 100644 --- a/src/app/(protected)/(cadastros)/cadastros/(t_tb_reconhecimentotipo)/reconhecimentos/page.tsx +++ b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex.tsx @@ -5,19 +5,19 @@ import { Card, CardContent } from '@/components/ui/card'; 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'; +import TTBReconhecimentoTipoTable from './TTBReconhecimentoTipoTable'; +import TTBReconhecimentoTipoForm from './TTBReconhecimentoTipoForm'; -import { useTTBReconhecimentoTipoReadHook } from '../../_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoReadHook'; -import { useTTBReconhecimentoTipoSaveHook } from '../../_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook'; -import { useTTBReconhecimentoTipoDeleteHook } from '../../_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook'; +import { useTTBReconhecimentoTipoReadHook } from '@/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook'; +import { useTTBReconhecimentoTipoSaveHook } from '@/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook'; +import { useTTBReconhecimentoTipoDeleteHook } from '@/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; +import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; -export default function TTBAndamentoServico() { +export default function TTBReconhecimentoTipoIndex() { // Hooks para leitura e salvamento const { tTBReconhecimentosTipos, fetchTTBReconhecimentosTipos } = useTTBReconhecimentoTipoReadHook(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_components/t_tb_reconhecimentotipo/TTBReconhecimentoTipoTable.tsx b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoTable.tsx similarity index 96% rename from src/app/(protected)/(cadastros)/cadastros/_components/t_tb_reconhecimentotipo/TTBReconhecimentoTipoTable.tsx rename to src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoTable.tsx index d6aba1f..1724e30 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_components/t_tb_reconhecimentotipo/TTBReconhecimentoTipoTable.tsx +++ b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoTable.tsx @@ -19,7 +19,7 @@ import { } from '@/components/ui/table'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; +import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; interface TTBReconhecimentoTipoTableProps { data: TTBReconhecimentoTipoInterface[]; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeIndexData.ts b/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeIndexData.ts rename to src/packages/administrativo/data/GCidade/GCidadeIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeRemoveData.ts b/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts similarity index 92% rename from src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeRemoveData.ts rename to src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts index 7f4a5df..1801b13 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeRemoveData.ts +++ b/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts @@ -5,7 +5,7 @@ import API from '@/shared/services/api/Api'; 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'; +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Importa função que encapsula chamadas assíncronas e trata erros automaticamente import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeSaveData.ts b/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts similarity index 93% rename from src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeSaveData.ts rename to src/packages/administrativo/data/GCidade/GCidadeSaveData.ts index aa9f549..cd1aede 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GCidade/GCidadeSaveData.ts +++ b/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts @@ -5,7 +5,7 @@ import API from '@/shared/services/api/Api'; 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'; +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Importa função que encapsula chamadas assíncronas e trata erros automaticamente import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoIndexData.ts b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoIndexData.ts rename to src/packages/administrativo/data/GMedidoTipo/GMedidaTipoIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoRemoveData.ts b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoRemoveData.ts similarity index 85% rename from src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoRemoveData.ts rename to src/packages/administrativo/data/GMedidoTipo/GMedidaTipoRemoveData.ts index 0aa1865..a6c03a4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoRemoveData.ts +++ b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoRemoveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoSaveData.ts b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoSaveData.ts similarity index 87% rename from src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoSaveData.ts rename to src/packages/administrativo/data/GMedidoTipo/GMedidaTipoSaveData.ts index 6451de4..3af3ad6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GMedidoTipo/GMedidaTipoSaveData.ts +++ b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroIndexData.ts b/src/packages/administrativo/data/GTBBairro/GTBBairroIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroIndexData.ts rename to src/packages/administrativo/data/GTBBairro/GTBBairroIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroRemoveData.ts b/src/packages/administrativo/data/GTBBairro/GTBBairroRemoveData.ts similarity index 83% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroRemoveData.ts rename to src/packages/administrativo/data/GTBBairro/GTBBairroRemoveData.ts index ec18573..643317f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroRemoveData.ts +++ b/src/packages/administrativo/data/GTBBairro/GTBBairroRemoveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; +import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroSaveData.ts b/src/packages/administrativo/data/GTBBairro/GTBBairroSaveData.ts similarity index 85% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroSaveData.ts rename to src/packages/administrativo/data/GTBBairro/GTBBairroSaveData.ts index aff56c6..8e0086a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBBairro/GTBBairroSaveData.ts +++ b/src/packages/administrativo/data/GTBBairro/GTBBairroSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; +import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts similarity index 89% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts rename to src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts index 60d57c7..e3bb035 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts +++ b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilIndexData.ts @@ -6,7 +6,7 @@ async function executeGTBEstadoCivilIndexData() { const api = new API(); return await api.send({ method: Methods.GET, - endpoint: `administrativo/g_tb_estado_civil/`, + endpoint: `administrativo/g_tb_estadocivil/`, }); } diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts similarity index 73% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts rename to src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts index 90fefea..fe0353b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts +++ b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; @@ -8,7 +8,7 @@ async function executeGTBEstadoCivilRemoveData(data: GTBEstadoCivilInterface) { return await api.send({ method: Methods.DELETE, - endpoint: `administrativo/g_tb_bairro/${data.tb_estadocivil_id}`, + endpoint: `administrativo/g_tb_estadocivil/${data.tb_estadocivil_id}`, }); } diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts similarity index 76% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts rename to src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts index 35b42aa..3ee7091 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts +++ b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; @@ -10,7 +10,7 @@ async function executeGTBEstadoCivilSaveData(data: GTBEstadoCivilInterface) { return await api.send({ method: isUpdate ? Methods.PUT : Methods.POST, - endpoint: `administrativo/g_tb_bairro/${data.tb_estadocivil_id || ''}`, + endpoint: `administrativo/g_tb_estadocivil/${data.tb_estadocivil_id || ''}`, body: data, }); } diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoIndexData.ts b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoIndexData.ts rename to src/packages/administrativo/data/GTBProfissao/GTBProfissaoIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoRemoveData.ts b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoRemoveData.ts similarity index 76% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoRemoveData.ts rename to src/packages/administrativo/data/GTBProfissao/GTBProfissaoRemoveData.ts index 05362e5..a5687fd 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoRemoveData.ts +++ b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoRemoveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; +import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBProfissaoRemoveData(data: GTBProfissaoInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoSaveData.ts b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoSaveData.ts similarity index 80% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoSaveData.ts rename to src/packages/administrativo/data/GTBProfissao/GTBProfissaoSaveData.ts index 28fd36e..8759e49 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBProfissao/GTBProfissaoSaveData.ts +++ b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; +import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBProfissaoSaveData(data: GTBProfissaoInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensIndexData.ts b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensIndexData.ts rename to src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensRemoveData.ts b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensRemoveData.ts similarity index 79% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensRemoveData.ts rename to src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensRemoveData.ts index 04ffc5c..265e03f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensRemoveData.ts +++ b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensRemoveData.ts @@ -1,6 +1,6 @@ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; export default async function GTBRegimeBensRemoveData(data: GTBRegimeBensInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensSaveData.ts b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensSaveData.ts similarity index 88% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensSaveData.ts rename to src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensSaveData.ts index bddea05..7a42da6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBRegimeBens/GTBRegimeBensSaveData.ts +++ b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts rename to src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts similarity index 84% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts rename to src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts index 5162f52..b57ac35 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts +++ b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts similarity index 86% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts rename to src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts index 5fa84e2..4243ec8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts +++ b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts similarity index 75% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts rename to src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts index ac1f446..0766aa9 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts +++ b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBRegimeComunhaoIndexData() { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts similarity index 78% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts rename to src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts index 77f3c34..3c0148b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts +++ b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts @@ -1,6 +1,6 @@ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; export default async function GTBRegimeComunhaoRemoveData(data: GTBRegimeComunhaoInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts similarity index 82% rename from src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts rename to src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts index a994921..09e71cc 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts +++ b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBRegimeComunhaoSaveData(data: GTBRegimeComunhaoInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GUf/GUfIndexData.ts b/src/packages/administrativo/data/GUf/GUfIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/GUf/GUfIndexData.ts rename to src/packages/administrativo/data/GUf/GUfIndexData.ts diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioDeleteData.ts b/src/packages/administrativo/data/GUsuario/GUsuarioDeleteData.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioDeleteData.ts rename to src/packages/administrativo/data/GUsuario/GUsuarioDeleteData.ts diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioIndexData.ts b/src/packages/administrativo/data/GUsuario/GUsuarioIndexData.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioIndexData.ts rename to src/packages/administrativo/data/GUsuario/GUsuarioIndexData.ts diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioLoginData.ts b/src/packages/administrativo/data/GUsuario/GUsuarioLoginData.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioLoginData.ts rename to src/packages/administrativo/data/GUsuario/GUsuarioLoginData.ts diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioReadData.ts b/src/packages/administrativo/data/GUsuario/GUsuarioReadData.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioReadData.ts rename to src/packages/administrativo/data/GUsuario/GUsuarioReadData.ts diff --git a/src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioSaveData.ts b/src/packages/administrativo/data/GUsuario/GUsuarioSaveData.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_data/g_usuario/GUsuarioSaveData.ts rename to src/packages/administrativo/data/GUsuario/GUsuarioSaveData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecDeleteData.ts b/src/packages/administrativo/data/TCensec/TCensecDeleteData.ts similarity index 87% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecDeleteData.ts rename to src/packages/administrativo/data/TCensec/TCensecDeleteData.ts index 3723b28..0c1ce80 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecDeleteData.ts +++ b/src/packages/administrativo/data/TCensec/TCensecDeleteData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecIndexData.ts b/src/packages/administrativo/data/TCensec/TCensecIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecIndexData.ts rename to src/packages/administrativo/data/TCensec/TCensecIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecSaveData.ts b/src/packages/administrativo/data/TCensec/TCensecSaveData.ts similarity index 89% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecSaveData.ts rename to src/packages/administrativo/data/TCensec/TCensecSaveData.ts index 1d493e2..fc0724e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensec/TCensecSaveData.ts +++ b/src/packages/administrativo/data/TCensec/TCensecSaveData.ts @@ -1,6 +1,6 @@ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecSaveData(data: TCensecInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts rename to src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts similarity index 83% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts rename to src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts index 885a818..efb5e52 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts +++ b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts similarity index 85% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts rename to src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts index edee5c4..35201df 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts +++ b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoIndexData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts similarity index 86% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoIndexData.ts rename to src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts index fad057f..312b784 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoIndexData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts @@ -1,10 +1,7 @@ import API from "@/shared/services/api/Api"; import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import TCensecTipoAtoMockDeDados from "./mockCensecTipoAto"; import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -const useMock = true - async function executeTCensecTipoAtoIndexData() { const api = new API(); return await api.send({ diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoRemoveData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts similarity index 85% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoRemoveData.ts rename to src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts index 5d36abb..467497e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoRemoveData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts @@ -1,5 +1,5 @@ import API from "@/shared/services/api/Api"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoSaveData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts similarity index 87% rename from src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoSaveData.ts rename to src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts index 042e234..d1d01f2 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TCensecTipoAto/GMedidaTipoSaveData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts @@ -1,5 +1,5 @@ import API from "@/shared/services/api/Api"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/MinutaTexto.ts b/src/packages/administrativo/data/TMinuta/MinutaTexto.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/MinutaTexto.ts rename to src/packages/administrativo/data/TMinuta/MinutaTexto.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndex.ts b/src/packages/administrativo/data/TMinuta/TMinutaIndex.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndex.ts rename to src/packages/administrativo/data/TMinuta/TMinutaIndex.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndexData.ts b/src/packages/administrativo/data/TMinuta/TMinutaIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaIndexData.ts rename to src/packages/administrativo/data/TMinuta/TMinutaIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaRemoveData.ts b/src/packages/administrativo/data/TMinuta/TMinutaRemoveData.ts similarity index 81% rename from src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaRemoveData.ts rename to src/packages/administrativo/data/TMinuta/TMinutaRemoveData.ts index 509dc38..df38fe2 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaRemoveData.ts +++ b/src/packages/administrativo/data/TMinuta/TMinutaRemoveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TMinutaRemoveData(data: TMinutaInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaSaveData.ts b/src/packages/administrativo/data/TMinuta/TMinutaSaveData.ts similarity index 84% rename from src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaSaveData.ts rename to src/packages/administrativo/data/TMinuta/TMinutaSaveData.ts index f14ccd2..bb99663 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/TMinutaSaveData.ts +++ b/src/packages/administrativo/data/TMinuta/TMinutaSaveData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TMinutaSaveData(data: TMinutaInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/mockMinuta.ts b/src/packages/administrativo/data/TMinuta/mockMinuta.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/TMinuta/mockMinuta.ts rename to src/packages/administrativo/data/TMinuta/mockMinuta.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts rename to src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts similarity index 81% rename from src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts rename to src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts index 0289c71..ddec4b4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts +++ b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts @@ -1,7 +1,7 @@ 'use server'; import API from '@/shared/services/api/Api'; -import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; +import TTBAndamentoServicoInteface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TTBAndamentoServicoRemoveData( diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts similarity index 87% rename from src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts rename to src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts index 292226f..ac8bd27 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts +++ b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts @@ -1,7 +1,7 @@ 'use server'; import API from '@/shared/services/api/Api'; -import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; +import TTBAndamentoServicoInteface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts similarity index 78% rename from src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts rename to src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts index 21c3280..e7ac3b9 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts +++ b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts @@ -1,5 +1,5 @@ import API from '@/shared/services/api/Api'; -import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; +import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function TTBReconhecimentoTipoDeleteData( diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts rename to src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts similarity index 81% rename from src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts rename to src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts index b3851ce..647ff2b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts +++ b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts @@ -1,6 +1,6 @@ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; +import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; export default async function TTBReconhecimentoTipoSaveData(data: TTBReconhecimentoTipoInterface) { const api = new API(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeReadHook.ts b/src/packages/administrativo/hooks/GCidade/useGCidadeReadHook.ts similarity index 80% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeReadHook.ts rename to src/packages/administrativo/hooks/GCidade/useGCidadeReadHook.ts index 93aa244..5b02124 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeReadHook.ts +++ b/src/packages/administrativo/hooks/GCidade/useGCidadeReadHook.ts @@ -1,7 +1,7 @@ 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 +import { GCidadeIndexService } from '@/packages/administrativo/services/GCidade/GCidadeIndexService'; // Serviço que busca a lista de cidades +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Interface tipada da cidade // Hook customizado para leitura de dados de cidades export const useGCidadeReadHook = () => { diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeRemoveHook.ts b/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts similarity index 74% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeRemoveHook.ts rename to src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts index 1606f60..6b22a8d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeRemoveHook.ts +++ b/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts @@ -1,6 +1,6 @@ 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 +import GCidadeInterface from "@/packages/administrativo/interfaces/GCidade/GCidadeInterface"; // Interface tipada da cidade +import { GCidadeRemoveData } from "@/packages/administrativo/data/GCidade/GCidadeRemoveData"; // Função que remove a cidade via API // Hook customizado para remoção de cidades export const useGCidadeRemoveHook = () => { diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeSaveHook.ts b/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts similarity index 68% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeSaveHook.ts rename to src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts index 0b0a34e..6629674 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_cidade/useGCidadeSaveHook.ts +++ b/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts @@ -1,15 +1,12 @@ import { useState } from 'react'; import { useResponse } from '@/shared/components/response/ResponseContext'; -import GCidadeInterface from '../../_interfaces/GCidadeInterface'; -import { GCidadeSaveService } from '../../_services/g_cidade/GCidadeSaveService'; +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; +import { GCidadeSaveService } from '@/packages/administrativo/services/GCidade/GCidadeSaveService'; export const useGCidadeSaveHook = () => { const { setResponse } = useResponse(); const [gCidade, setGCidade] = useState(null); - // controla se o formulário está aberto ou fechado - // const [isOpen, setIsOpen] = useState(false); - const saveGCidade = async (data: GCidadeInterface) => { const response = await GCidadeSaveService(data); @@ -19,7 +16,7 @@ export const useGCidadeSaveHook = () => { // Manda a resposta para o verificador de resposta setResponse(response); - } + } return { gCidade, saveGCidade }; }; diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoReadHook.ts b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoReadHook.ts similarity index 72% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoReadHook.ts rename to src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoReadHook.ts index 40ad33f..84bb846 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoReadHook.ts +++ b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; -import { GMedidaTipoIndexService } from '../../_services/g_medidatipo/GMedidaTipoIndexService'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; +import { GMedidaTipoIndexService } from '../../services/GMedidaTipo/GMedidaTipoIndexService'; export const useGMedidaTipoReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoRemoveHook.ts b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoRemoveHook.ts similarity index 66% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoRemoveHook.ts rename to src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoRemoveHook.ts index 9ce8bd8..32c2f6e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoRemoveHook.ts +++ b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; -import { GMedidaTipoRemoveService } from '../../_services/g_medidatipo/GMedidaTipoRemoveService'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; +import { GMedidaTipoRemoveService } from '../../services/GMedidaTipo/GMedidaTipoRemoveService'; export const useGMedidaTipoRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoSaveHook.ts b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoSaveHook.ts similarity index 80% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoSaveHook.ts rename to src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoSaveHook.ts index a5de7c4..d1e7d8e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_medidatipo/useGMedidaTipoSaveHook.ts +++ b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoSaveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; -import { GMedidaTipoSaveService } from '../../_services/g_medidatipo/GMedidaTipoSaveService'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; +import { GMedidaTipoSaveService } from '../../services/GMedidaTipo/GMedidaTipoSaveService'; export const useGMedidaTipoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook.ts b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts similarity index 77% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook.ts rename to src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts index 6589d0c..eeea75a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroReadHook.ts +++ b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts @@ -2,8 +2,8 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useMemo, useState } from 'react'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; -import { GTBBairroIndexService } from '../../_services/g_tb_bairro/GTBBairroIndexService'; +import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; +import { GTBBairroIndexService } from '@/packages/administrativo/services/GTBBairro/GTBBairroIndexService'; export const useGTBBairroReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroRemoveHook.ts b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook.ts similarity index 62% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroRemoveHook.ts rename to src/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook.ts index c5f914b..a6487e0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; -import { GTBBairroRemoveService } from '../../_services/g_tb_bairro/GTBBairroRemoveService'; +import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; +import { GTBBairroRemoveService } from '@/packages/administrativo/services/GTBBairro/GTBBairroRemoveService'; export const useGTBBairroRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroSaveHook.ts b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook.ts similarity index 78% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroSaveHook.ts rename to src/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook.ts index 397c63a..93cd43a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_bairro/useGTBBairroSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; -import { GTBBairroSaveService } from '../../_services/g_tb_bairro/GTBBairroSaveService'; +import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; +import { GTBBairroSaveService } from '@/packages/administrativo/services/GTBBairro/GTBBairroSaveService'; export const useGTBBairroSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook.ts b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook.ts similarity index 71% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook.ts rename to src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook.ts index 4de86c4..fdfbf0f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilReadHook.ts +++ b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; -import { GTBEstadoCivilIndexService } from '../../_services/g_tb_estadocivil/GTBEstadoCivilIndexService'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; +import { GTBEstadoCivilIndexService } from '../../services/GTBEstadoCivil/GTBEstadoCivilIndexService'; export const useGTBEstadoCivilReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook.ts b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook.ts similarity index 64% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook.ts rename to src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook.ts index 20d0757..f9837d0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; -import { GTBEstadoCivilRemoveService } from '../../_services/g_tb_estadocivil/GTBEstadoCivilRemoveService'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; +import { GTBEstadoCivilRemoveService } from '../../services/GTBEstadoCivil/GTBEstadoCivilRemoveService'; export const useGTBEstadoCivilRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilSaveHook.ts b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook.ts similarity index 79% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilSaveHook.ts rename to src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook.ts index c353803..6165151 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_estadocivil/useGTBEstadoCivilSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; -import { GTBEstadoCivilSaveService } from '../../_services/g_tb_estadocivil/GTBEstadoCivilSaveService'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; +import { GTBEstadoCivilSaveService } from '../../services/GTBEstadoCivil/GTBEstadoCivilSaveService'; export const useGTBEstadoCivilSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook.ts similarity index 69% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts rename to src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook.ts index 9449750..7dd270d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts +++ b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; -import GTBProfissaoIndexService from '../../_services/g_tb_profissao/GTBProfissaoIndexService'; +import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; +import GTBProfissaoIndexService from '@/packages/administrativo/services/GTBProfissao/GTBProfissaoIndexService'; export const useGTBProfissaoReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoRemoveHook.ts b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook.ts similarity index 62% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoRemoveHook.ts rename to src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook.ts index 7bcc420..40be905 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; -import GTBProfissaoRemoveService from '../../_services/g_tb_profissao/GTBProfissaoRemoveService'; +import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; +import GTBProfissaoRemoveService from '@/packages/administrativo/services/GTBProfissao/GTBProfissaoRemoveService'; export const useGTBProfissaoRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoSaveHook.ts b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook.ts similarity index 77% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoSaveHook.ts rename to src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook.ts index e70613f..8efae52 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import GTBProfissaoInterface from '../../_interfaces/GTBProfissaoInterface'; -import GTBProfissaoSaveService from '../../_services/g_tb_profissao/GTBProfissaoSaveService'; +import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; +import GTBProfissaoSaveService from '@/packages/administrativo/services/GTBProfissao/GTBProfissaoSaveService'; export const useGTBProfissaoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensReadHook.ts b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensReadHook.ts similarity index 71% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensReadHook.ts rename to src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensReadHook.ts index c1fcd33..1016c26 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensReadHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import GTBRegimeBensIndexService from '../../_services/g_tb_regimebens/GTBRegimeBensIndexService'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; +import GTBRegimeBensIndexService from '@/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensIndexService'; +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; export const useGTBRegimeBensReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook.ts b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook.ts similarity index 67% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook.ts rename to src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook.ts index 5d13520..9ce5d5f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; -import GTBRegimeBensRemoveData from '../../_data/GTBRegimeBens/GTBRegimeBensRemoveData'; +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; +import GTBRegimeBensRemoveData from '../../data/GTBRegimeBens/GTBRegimeBensRemoveData'; export const useGTBRegimeBensRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook.ts b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensSaveHook.ts similarity index 81% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook.ts rename to src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensSaveHook.ts index 172d2b5..6d88299 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimebens/useGTBRegimeBensSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensSaveHook.ts @@ -1,7 +1,7 @@ import { useState } from 'react'; import { useResponse } from '@/shared/components/response/ResponseContext'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; -import { GTBRegimeBensSaveService } from '../../_services/g_tb_regimebens/GTBRegimeBensSaveService'; +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; +import { GTBRegimeBensSaveService } from '@/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensSaveService'; export const useGTBRegimeBensSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook.ts b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook.ts similarity index 71% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook.ts rename to src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook.ts index da4de8b..7dcf538 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoReadHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; -import { GTBRegimeComunhaoIndexService } from '../../_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; +import { GTBRegimeComunhaoIndexService } from '../../services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService'; export const useGTBRegimeComunhaoReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook.ts b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook.ts similarity index 64% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook.ts rename to src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook.ts index 136c291..713426b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; -import { GTBRegimeComunhaoRemoveService } from '../../_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; +import { GTBRegimeComunhaoRemoveService } from '../../services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService'; export const useGTBRegimeComunhaoRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook.ts b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook.ts similarity index 81% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook.ts rename to src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook.ts index 0f66906..a3cf85c 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_regimecomunhao/useGTBRegimeComunhaoSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook.ts @@ -1,7 +1,7 @@ import { useState } from 'react'; import { useResponse } from '@/shared/components/response/ResponseContext'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; -import { GTBRegimeComunhaoSaveService } from '../../_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; +import { GTBRegimeComunhaoSaveService } from '../../services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService'; export const useGTBRegimeComunhaoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook.ts b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts similarity index 73% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook.ts rename to src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts index 6202c13..a42e25f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroReadHook.ts +++ b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useMemo, useState } from 'react'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; -import { GTBTipoLogradouroIndexService } from '../../_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroIndexService } from '../../services/GTBTipoLogradouro/GTBTipoLogradouroIndexService'; export const useGTBTipoLogradouroReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroRemoveHook.ts b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook.ts similarity index 63% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroRemoveHook.ts rename to src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook.ts index 93ce5c2..f49ce1e 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; -import { GTBTipoLogradouroRemoveService } from '../../_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroRemoveService } from '../../services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService'; export const useGTBTipoLogradouroRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroSaveHook.ts b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook.ts similarity index 79% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroSaveHook.ts rename to src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook.ts index e64278a..8af49f6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_tipologradouro/useGTBTipoLogradouroSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; -import { GTBTipoLogradouroSaveService } from '../../_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroSaveService } from '../../services/GTBTipoLogradouro/GTBTipoLogradouroSaveService'; export const useGTBTipoLogradouroSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_uf/useGUfReadHook.ts b/src/packages/administrativo/hooks/GUF/useGUfReadHook.ts similarity index 78% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/g_uf/useGUfReadHook.ts rename to src/packages/administrativo/hooks/GUF/useGUfReadHook.ts index 6361973..18e9436 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_uf/useGUfReadHook.ts +++ b/src/packages/administrativo/hooks/GUF/useGUfReadHook.ts @@ -2,8 +2,8 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { use, useState } from 'react'; -import GUfInterface from '../../_interfaces/GUfInterface'; -import GUfIndexService from '../../_services/g_uf/GUfIndexService'; +import GUfInterface from '@/packages/administrativo/interfaces/GUF/GUfInterface'; +import GUfIndexService from '@/packages/administrativo/services/GUF/GUfIndexService'; export const useGUfReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioIndexHook.ts b/src/packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook.ts similarity index 80% rename from src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioIndexHook.ts rename to src/packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook.ts index 2df1b1e..9c8f56c 100644 --- a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioIndexHook.ts +++ b/src/packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook.ts @@ -1,8 +1,8 @@ 'use client'; import { useState } from 'react'; -import Usuario from '../../_interfaces/GUsuarioInterface'; -import GUsuarioIndex from '../../_services/g_usuario/GUsuarioIndex'; +import Usuario from '../../interfaces/GUsuario/GUsuarioInterface'; +import GUsuarioIndex from '../../services/GUsuario/GUsuarioIndex'; import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioIndexHook = () => { diff --git a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioLogoutHook.ts b/src/packages/administrativo/hooks/GUsuario/useGUsuarioLogoutHook.ts similarity index 68% rename from src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioLogoutHook.ts rename to src/packages/administrativo/hooks/GUsuario/useGUsuarioLogoutHook.ts index 83541a8..7e3ba37 100644 --- a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioLogoutHook.ts +++ b/src/packages/administrativo/hooks/GUsuario/useGUsuarioLogoutHook.ts @@ -1,6 +1,6 @@ 'use client'; -import GUsuarioLogoutService from '../../_services/g_usuario/GUsuarioLogoutService'; +import GUsuarioLogoutService from '../../services/GUsuario/GUsuarioLogoutService'; export const useGUsuarioLogoutHook = () => { const logoutUsuario = async () => { diff --git a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioReadHooks.ts b/src/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks.ts similarity index 79% rename from src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioReadHooks.ts rename to src/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks.ts index 116d489..70c299c 100644 --- a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioReadHooks.ts +++ b/src/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks.ts @@ -1,8 +1,8 @@ 'use client'; import { useState } from 'react'; -import Usuario from '../../_interfaces/GUsuarioInterface'; -import GUsuarioRead from '../../_services/g_usuario/GUsuarioRead'; +import Usuario from '../../interfaces/GUsuario/GUsuarioInterface'; +import GUsuarioRead from '../../services/GUsuario/GUsuarioRead'; import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioReadHooks = () => { diff --git a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioSaveHook.ts b/src/packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook.ts similarity index 78% rename from src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioSaveHook.ts rename to src/packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook.ts index 58846ed..5d75e00 100644 --- a/src/app/(protected)/(administrativo)/_hooks/g_usuario/useGUsuarioSaveHook.ts +++ b/src/packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook.ts @@ -1,8 +1,8 @@ 'use client'; import { useState } from 'react'; -import Usuario from '../../_interfaces/GUsuarioInterface'; -import GUsuarioSave from '../../_services/g_usuario/GUsuarioSave'; +import Usuario from '../../interfaces/GUsuario/GUsuarioInterface'; +import GUsuarioSave from '../../services/GUsuario/GUsuarioSave'; import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioSaveHook = () => { diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecDeleteHook.ts b/src/packages/administrativo/hooks/TCensec/useTCensecDeleteHook.ts similarity index 68% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecDeleteHook.ts rename to src/packages/administrativo/hooks/TCensec/useTCensecDeleteHook.ts index c420a37..5bbb086 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecDeleteHook.ts +++ b/src/packages/administrativo/hooks/TCensec/useTCensecDeleteHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; -import { TCensecDeleteService } from '../../_services/t_censec/TCensecDeleteService'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; +import { TCensecDeleteService } from '../../services/TCensec/TCensecDeleteService'; export const useTCensecDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecReadHook.ts b/src/packages/administrativo/hooks/TCensec/useTCensecReadHook.ts similarity index 74% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecReadHook.ts rename to src/packages/administrativo/hooks/TCensec/useTCensecReadHook.ts index b3ed67d..0895a39 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecReadHook.ts +++ b/src/packages/administrativo/hooks/TCensec/useTCensecReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import { TCensecIndexService } from '../../_services/t_censec/TCensecIndexService'; +import { TCensecIndexService } from '../../services/TCensec/TCensecIndexService'; import { useState } from 'react'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; export const useTCensecReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecSaveHook.ts b/src/packages/administrativo/hooks/TCensec/useTCensecSaveHook.ts similarity index 84% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecSaveHook.ts rename to src/packages/administrativo/hooks/TCensec/useTCensecSaveHook.ts index 9d1c6e9..fb2a950 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec/useTCensecSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensec/useTCensecSaveHook.ts @@ -2,8 +2,8 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; -import { TCensecSaveService } from '../../_services/t_censec/TCensecSaveService'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; +import { TCensecSaveService } from '../../services/TCensec/TCensecSaveService'; export const useTCensecSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioReadHook.ts b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook.ts similarity index 67% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioReadHook.ts rename to src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook.ts index feabe73..d109379 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioReadHook.ts +++ b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; -import { TCensecNaturezaLitigioIndexService } from '../../_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService'; +import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioIndexService } from '@/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService'; export const useTCensecNaturezaLitigioReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook.ts b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook.ts similarity index 68% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook.ts rename to src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook.ts index 5e06778..57e5ab4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioRemoveHook.ts +++ b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { useState } from 'react'; -import { TCensecNaturezaLitigioRemoveData } from '../../_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData'; +import { TCensecNaturezaLitigioRemoveData } from '@/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData'; export const useTCensecNaturezaLitigioRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioSaveHook.ts b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook.ts similarity index 75% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioSaveHook.ts rename to src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook.ts index afdf235..84b5ba1 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censecnaturezalitigio/useTCensecNaturezaLitigioSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; -import { TCensecNaturezaLitigioSaveService } from '../../_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService'; +import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioSaveService } from '@/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService'; export const useTCensecNaturezaLitigioSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts similarity index 72% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook.ts rename to src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts index b24c858..2709ae0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoReadHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from "@/shared/components/response/ResponseContext" import { useState } from "react"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; -import { TCensecTipoAtoIndexService } from "../../_services/t_censec_tipoato/TCensecTipoAtoIndexService"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; +import { TCensecTipoAtoIndexService } from "../../services/TCensecTipoAto/TCensecTipoAtoIndexService"; export const useTCensecTipoAtoReadHook = () => { diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoRemoveHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts similarity index 65% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoRemoveHook.ts rename to src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts index d1083bb..6676d2b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoRemoveHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from "@/shared/components/response/ResponseContext" -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; -import { TCensecTipoAtoRemoveService } from "../../_services/t_censec_tipoato/TCensecTipoAtoRemoveService"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; +import { TCensecTipoAtoRemoveService } from "../../services/TCensecTipoAto/TCensecTipoAtoRemoveService"; export const useTCensecTipoAtoRemoveHook = () => { diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoSaveHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts similarity index 77% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoSaveHook.ts rename to src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts index 6f8390b..77e763a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_censec_tipoato/useTCensecTipoAtoSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from "@/shared/components/response/ResponseContext" import { useState } from "react"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; -import { TCensecTipoAtoSaveService } from "../../_services/t_censec_tipoato/TCensecTipoAtoSaveService"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; +import { TCensecTipoAtoSaveService } from "../../services/TCensecTipoAto/TCensecTipoAtoSaveService"; export const useTCensecTipoAtoSaveHook = () => { diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaIndexHook.ts b/src/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook.ts similarity index 70% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaIndexHook.ts rename to src/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook.ts index 8509395..92fe503 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaIndexHook.ts +++ b/src/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; -import TMinutaIndex from '../../_services/t_minuta/TMinutaIndex'; +import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; +import TMinutaIndex from '@/packages/administrativo/services/TMinuta/TMinutaIndex'; export const useTMinutaIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaReadHook.ts b/src/packages/administrativo/hooks/TMinuta/useTMinutaReadHook.ts similarity index 71% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaReadHook.ts rename to src/packages/administrativo/hooks/TMinuta/useTMinutaReadHook.ts index 014d786..e069501 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaReadHook.ts +++ b/src/packages/administrativo/hooks/TMinuta/useTMinutaReadHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; -import TMinutaIndexService from '../../_services/t_minuta/TMinutaIndexService'; +import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; +import TMinutaIndexService from '@/packages/administrativo/services/TMinuta/TMinutaIndexService'; export const useTMinutaReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaRemoveHook.ts b/src/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook.ts similarity index 63% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaRemoveHook.ts rename to src/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook.ts index 9d05bc4..65d9f1f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaRemoveHook.ts +++ b/src/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; -import TMinutaRemoveService from '../../_services/t_minuta/TMinutaRemoveService'; +import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; +import TMinutaRemoveService from '@/packages/administrativo/services/TMinuta/TMinutaRemoveService'; export const useTMinutaRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaSaveHook.ts b/src/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook.ts similarity index 78% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaSaveHook.ts rename to src/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook.ts index 4e68362..ddfec01 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_minuta/useTMinutaSaveHook.ts +++ b/src/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; -import TMinutaSaveService from '../../_services/t_minuta/TMinutaSaveService'; +import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; +import TMinutaSaveService from '@/packages/administrativo/services/TMinuta/TMinutaSaveService'; export const useTMinutaSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoDeleteHook.ts b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook.ts similarity index 69% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoDeleteHook.ts rename to src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook.ts index 5d40130..78fdd91 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoDeleteHook.ts +++ b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook.ts @@ -1,7 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; -import TTBAndamentoServicoRemoveData from '../../_data/TTBAndamentoServico/TTBAndamentoServicoRemoveData'; +import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; +import TTBAndamentoServicoRemoveData from '@/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData'; export const useTTBAndamentoServicoDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook.ts b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook.ts similarity index 78% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook.ts rename to src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook.ts index 213dca5..4755167 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoReadHook.ts +++ b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook.ts @@ -2,8 +2,8 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; -import TTBAndamentoServicoIndexData from '../../_data/TTBAndamentoServico/TTBAndamentoServicoIndexData'; +import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; +import TTBAndamentoServicoIndexData from '@/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoIndexData'; export const useTTBAndamentoServicoReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook.ts b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook.ts similarity index 78% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook.ts rename to src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook.ts index a94b5e7..cf0496a 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_andamentoservico/useTTBAndamentoServicoSaveHook.ts +++ b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook.ts @@ -2,8 +2,8 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TTBAndamentoServicoInteface from '../../_interfaces/TTBAndamentoServicoInterface'; -import { TTBAndamentoServicoSaveData } from '../../_data/TTBAndamentoServico/TTBAndamentoServicoSaveData'; +import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; +import { TTBAndamentoServicoSaveData } from '@/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData'; export const useTTBAndamentoServicoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook.ts b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook.ts similarity index 60% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook.ts rename to src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook.ts index e2ca4bc..d04c23f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoDeleteHook.ts +++ b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook.ts @@ -1,6 +1,6 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import TTBReconhecimentoTipoInterface from '../../_interfaces/TTBReconhecimentoTipoInterface'; -import TTBReconhecimentoTipoDeleteData from '../../_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData'; +import TTBReconhecimentoTipoInterface from '@/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; +import TTBReconhecimentoTipoDeleteData from '@/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData'; export const useTTBReconhecimentoTipoDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoReadHook.ts b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook.ts similarity index 69% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoReadHook.ts rename to src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook.ts index 0b10fae..a6fb552 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoReadHook.ts +++ b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook.ts @@ -1,9 +1,9 @@ 'use client'; -import ITTTBReconhecimentoTipo from '../../_interfaces/TTBReconhecimentoTipoInterface'; +import ITTTBReconhecimentoTipo from '@/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TTBReconhecimentoTipoIndexData from '../../_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData'; +import TTBReconhecimentoTipoIndexData from '@/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData'; export const useTTBReconhecimentoTipoReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook.ts b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook.ts similarity index 77% rename from src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook.ts rename to src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook.ts index 8d348b1..4988562 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/t_tb_reconhecimentotipo/useTTBReconhecimentoTipoSaveHook.ts +++ b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook.ts @@ -2,8 +2,8 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import ITTTBReconhecimentoTipo from '../../_interfaces/TTBReconhecimentoTipoInterface'; -import TTBReconhecimentoTipoSaveData from '../../_data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData'; +import ITTTBReconhecimentoTipo from '@/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; +import TTBReconhecimentoTipoSaveData from '@/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData'; export const useTTBReconhecimentoTipoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GCidadeInterface.ts b/src/packages/administrativo/interfaces/GCidade/GCidadeInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GCidadeInterface.ts rename to src/packages/administrativo/interfaces/GCidade/GCidadeInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GMedidaTipoInterface.ts b/src/packages/administrativo/interfaces/GMedidaTipo/GMedidaTipoInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GMedidaTipoInterface.ts rename to src/packages/administrativo/interfaces/GMedidaTipo/GMedidaTipoInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBBairroInterface.ts b/src/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBBairroInterface.ts rename to src/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface.ts diff --git a/src/packages/administrativo/components/GTBBairro/GTBairroSelectInterface.ts b/src/packages/administrativo/interfaces/GTBBairro/GTBairroSelectInterface.ts similarity index 100% rename from src/packages/administrativo/components/GTBBairro/GTBairroSelectInterface.ts rename to src/packages/administrativo/interfaces/GTBBairro/GTBairroSelectInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBEstadoCivilInterface.ts b/src/packages/administrativo/interfaces/GTBEstadoCivil/GTBEstadoCivilInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBEstadoCivilInterface.ts rename to src/packages/administrativo/interfaces/GTBEstadoCivil/GTBEstadoCivilInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBProfissaoInterface.ts b/src/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBProfissaoInterface.ts rename to src/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBRegimeBensInterface.ts b/src/packages/administrativo/interfaces/GTBRegimeBens/GTBRegimeBensInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBRegimeBensInterface.ts rename to src/packages/administrativo/interfaces/GTBRegimeBens/GTBRegimeBensInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBRegimeComunhaoInterface.ts b/src/packages/administrativo/interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBRegimeComunhaoInterface.ts rename to src/packages/administrativo/interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBTipoLogradouroInterface.ts b/src/packages/administrativo/interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GTBTipoLogradouroInterface.ts rename to src/packages/administrativo/interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/GUfInterface.ts b/src/packages/administrativo/interfaces/GUF/GUfInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/GUfInterface.ts rename to src/packages/administrativo/interfaces/GUF/GUfInterface.ts diff --git a/src/app/(protected)/(administrativo)/_interfaces/GUsuarioInterface.ts b/src/packages/administrativo/interfaces/GUsuario/GUsuarioInterface.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_interfaces/GUsuarioInterface.ts rename to src/packages/administrativo/interfaces/GUsuario/GUsuarioInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecInterface.ts b/src/packages/administrativo/interfaces/TCensec/TCensecInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecInterface.ts rename to src/packages/administrativo/interfaces/TCensec/TCensecInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecNaturezaLitigioInterface.ts b/src/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecNaturezaLitigioInterface.ts rename to src/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecTipoAtoInterface.ts b/src/packages/administrativo/interfaces/TCensecTipoAto/TCensecTipoAtoInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/TCensecTipoAtoInterface.ts rename to src/packages/administrativo/interfaces/TCensecTipoAto/TCensecTipoAtoInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/TMinutaInterface.ts b/src/packages/administrativo/interfaces/TMinuta/TMinutaInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/TMinutaInterface.ts rename to src/packages/administrativo/interfaces/TMinuta/TMinutaInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/TTBAndamentoServicoInterface.ts b/src/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/TTBAndamentoServicoInterface.ts rename to src/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_interfaces/TTBReconhecimentoTipoInterface.ts b/src/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_interfaces/TTBReconhecimentoTipoInterface.ts rename to src/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GCidadeSchema.ts b/src/packages/administrativo/schemas/GCidade/GCidadeSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/GCidadeSchema.ts rename to src/packages/administrativo/schemas/GCidade/GCidadeSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GMedidaTipoSchema.ts b/src/packages/administrativo/schemas/GMedidaTipo/GMedidaTipoSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/GMedidaTipoSchema.ts rename to src/packages/administrativo/schemas/GMedidaTipo/GMedidaTipoSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBBairroSchema.ts b/src/packages/administrativo/schemas/GTBBairro/GTBBairroSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/GTBBairroSchema.ts rename to src/packages/administrativo/schemas/GTBBairro/GTBBairroSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBEstadoCivilSchema.ts b/src/packages/administrativo/schemas/GTBEstadoCivil/GTBEstadoCivilSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/GTBEstadoCivilSchema.ts rename to src/packages/administrativo/schemas/GTBEstadoCivil/GTBEstadoCivilSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBProfissaoSchema.ts b/src/packages/administrativo/schemas/GTBProfissao/GTBProfissaoSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/GTBProfissaoSchema.ts rename to src/packages/administrativo/schemas/GTBProfissao/GTBProfissaoSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBRegimeBensSchema.ts b/src/packages/administrativo/schemas/GTBRegimeBens/GTBRegimeBensSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/GTBRegimeBensSchema.ts rename to src/packages/administrativo/schemas/GTBRegimeBens/GTBRegimeBensSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBRegimeComunhaoSchema.ts b/src/packages/administrativo/schemas/GTBRegimeComunhao/GTBRegimeComunhaoSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/GTBRegimeComunhaoSchema.ts rename to src/packages/administrativo/schemas/GTBRegimeComunhao/GTBRegimeComunhaoSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/GTBTipoLogradouroSchema.ts b/src/packages/administrativo/schemas/GTBTipoLogradouro/GTBTipoLogradouroSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/GTBTipoLogradouroSchema.ts rename to src/packages/administrativo/schemas/GTBTipoLogradouro/GTBTipoLogradouroSchema.ts diff --git a/src/app/(protected)/(administrativo)/_schemas/GUsuarioLoginSchema.ts b/src/packages/administrativo/schemas/GUsuario/GUsuarioLoginSchema.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_schemas/GUsuarioLoginSchema.ts rename to src/packages/administrativo/schemas/GUsuario/GUsuarioLoginSchema.ts diff --git a/src/app/(protected)/(administrativo)/_schemas/GUsuarioSchema.ts b/src/packages/administrativo/schemas/GUsuario/GUsuarioSchema.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_schemas/GUsuarioSchema.ts rename to src/packages/administrativo/schemas/GUsuario/GUsuarioSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecSchema.ts b/src/packages/administrativo/schemas/TCensec/TCensecSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecSchema.ts rename to src/packages/administrativo/schemas/TCensec/TCensecSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecNaturezaLitigioSchema.ts b/src/packages/administrativo/schemas/TCensecNaturezaLitigio/TCensecNaturezaLitigioSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecNaturezaLitigioSchema.ts rename to src/packages/administrativo/schemas/TCensecNaturezaLitigio/TCensecNaturezaLitigioSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecTipoAtoSchema.ts b/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/TCensecTipoAtoSchema.ts rename to src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/TMinutaSchema.ts b/src/packages/administrativo/schemas/TMinuta/TMinutaSchema.ts similarity index 100% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/TMinutaSchema.ts rename to src/packages/administrativo/schemas/TMinuta/TMinutaSchema.ts diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/TTBAndamentoServicoSchema.ts b/src/packages/administrativo/schemas/TTBAndamentoServico/TTBAndamentoServicoSchema.ts similarity index 79% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/TTBAndamentoServicoSchema.ts rename to src/packages/administrativo/schemas/TTBAndamentoServico/TTBAndamentoServicoSchema.ts index fe4ca56..c581ce1 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_schemas/TTBAndamentoServicoSchema.ts +++ b/src/packages/administrativo/schemas/TTBAndamentoServico/TTBAndamentoServicoSchema.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { tipoEnum } from '../_interfaces/TTBAndamentoServicoInterface'; +import { tipoEnum } from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; export const TTBAndamentoServicoSchema = z.object({ tb_andamentoservico_id: z.number().optional(), diff --git a/src/app/(protected)/(cadastros)/cadastros/_schemas/TTBReconhecimentoTipoSchema.ts b/src/packages/administrativo/schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema.ts similarity index 73% rename from src/app/(protected)/(cadastros)/cadastros/_schemas/TTBReconhecimentoTipoSchema.ts rename to src/packages/administrativo/schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema.ts index 01a7532..2e248fa 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_schemas/TTBReconhecimentoTipoSchema.ts +++ b/src/packages/administrativo/schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { situacaoEnum } from '../_interfaces/TTBReconhecimentoTipoInterface'; +import { situacaoEnum } from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; export const TTBReconhecimentoTipoSchema = z.object({ tb_reconhecimentotipo_id: z.number().optional(), diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeIndexService.ts b/src/packages/administrativo/services/GCidade/GCidadeIndexService.ts similarity index 88% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeIndexService.ts rename to src/packages/administrativo/services/GCidade/GCidadeIndexService.ts index e6ab8dd..ce3431b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeIndexService.ts +++ b/src/packages/administrativo/services/GCidade/GCidadeIndexService.ts @@ -1,6 +1,6 @@ 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'; +import { GCidadeIndexData } from '@/packages/administrativo/data/GCidade/GCidadeIndexData'; // Função que retorna os dados da lista de cidades (chamada à API ou mock) // Função assíncrona que executa a chamada para buscar os dados de cidades diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeRemoveService.ts b/src/packages/administrativo/services/GCidade/GCidadeRemoveService.ts similarity index 79% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeRemoveService.ts rename to src/packages/administrativo/services/GCidade/GCidadeRemoveService.ts index 3dac891..d90cecd 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeRemoveService.ts +++ b/src/packages/administrativo/services/GCidade/GCidadeRemoveService.ts @@ -1,8 +1,8 @@ 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'; +import { GCidadeRemoveData } from '@/packages/administrativo/data/GCidade/GCidadeRemoveData'; // Função que remove os dados da cidade via API -import GCidadeInterface from '../../_interfaces/GCidadeInterface'; +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Interface tipada da cidade // Função assíncrona que executa a remoção de uma cidade diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeSaveService.ts b/src/packages/administrativo/services/GCidade/GCidadeSaveService.ts similarity index 80% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeSaveService.ts rename to src/packages/administrativo/services/GCidade/GCidadeSaveService.ts index 9b92ea0..e8a9fe6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_cidade/GCidadeSaveService.ts +++ b/src/packages/administrativo/services/GCidade/GCidadeSaveService.ts @@ -2,10 +2,10 @@ 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'; +import { GCidadeSaveData } from '@/packages/administrativo/data/GCidade/GCidadeSaveData'; // Interface tipada da cidade -import GCidadeInterface from '../../_interfaces/GCidadeInterface'; +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Função assíncrona que executa o salvamento de uma cidade async function executeGCidadeSaveService(data: GCidadeInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoIndexService.ts b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoIndexService.ts similarity index 79% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoIndexService.ts rename to src/packages/administrativo/services/GMedidaTipo/GMedidaTipoIndexService.ts index 28f4f30..d453af5 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoIndexService.ts +++ b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoIndexService.ts @@ -1,5 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GMedidaTipoIndexData } from '../../_data/GMedidoTipo/GMedidaTipoIndexData'; +import { GMedidaTipoIndexData } from '../../data/GMedidoTipo/GMedidaTipoIndexData'; async function executeGMedidaTipoIndexService() { const response = await GMedidaTipoIndexData(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoRemoveService.ts b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoRemoveService.ts similarity index 66% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoRemoveService.ts rename to src/packages/administrativo/services/GMedidaTipo/GMedidaTipoRemoveService.ts index c6892bb..1269fc4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoRemoveService.ts +++ b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoRemoveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GMedidaTipoRemoveData } from '../../_data/GMedidoTipo/GMedidaTipoRemoveData'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; +import { GMedidaTipoRemoveData } from '../../data/GMedidoTipo/GMedidaTipoRemoveData'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; async function executeGMedidaTipoRemoveService(data: GMedidaTipoInterface) { const response = await GMedidaTipoRemoveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoSaveService.ts b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoSaveService.ts similarity index 66% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoSaveService.ts rename to src/packages/administrativo/services/GMedidaTipo/GMedidaTipoSaveService.ts index 98dcf60..28f05fe 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_medidatipo/GMedidaTipoSaveService.ts +++ b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoSaveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GMedidaTipoSaveData } from '../../_data/GMedidoTipo/GMedidaTipoSaveData'; -import { GMedidaTipoInterface } from '../../_interfaces/GMedidaTipoInterface'; +import { GMedidaTipoSaveData } from '../../data/GMedidoTipo/GMedidaTipoSaveData'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; async function executeGMedidaTipoSaveService(data: GMedidaTipoInterface) { const response = await GMedidaTipoSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroIndexService.ts b/src/packages/administrativo/services/GTBBairro/GTBBairroIndexService.ts similarity index 76% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroIndexService.ts rename to src/packages/administrativo/services/GTBBairro/GTBBairroIndexService.ts index eddaef0..8f6e8b4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroIndexService.ts +++ b/src/packages/administrativo/services/GTBBairro/GTBBairroIndexService.ts @@ -1,5 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBBairroIndexData } from '../../_data/GTBBairro/GTBBairroIndexData'; +import { GTBBairroIndexData } from '@/packages/administrativo/data/GTBBairro/GTBBairroIndexData'; async function executeGTBBairroIndexService() { const response = await GTBBairroIndexData(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroRemoveService.ts b/src/packages/administrativo/services/GTBBairro/GTBBairroRemoveService.ts similarity index 62% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroRemoveService.ts rename to src/packages/administrativo/services/GTBBairro/GTBBairroRemoveService.ts index 64a389d..a51b2ee 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroRemoveService.ts +++ b/src/packages/administrativo/services/GTBBairro/GTBBairroRemoveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBBairroRemoveData } from '../../_data/GTBBairro/GTBBairroRemoveData'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; +import { GTBBairroRemoveData } from '@/packages/administrativo/data/GTBBairro/GTBBairroRemoveData'; +import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; async function executeGTBBairroRemoveService(data: GTBBairroInterface) { const response = await GTBBairroRemoveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroSaveService.ts b/src/packages/administrativo/services/GTBBairro/GTBBairroSaveService.ts similarity index 62% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroSaveService.ts rename to src/packages/administrativo/services/GTBBairro/GTBBairroSaveService.ts index e5d8f46..1223263 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_bairro/GTBBairroSaveService.ts +++ b/src/packages/administrativo/services/GTBBairro/GTBBairroSaveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBBairroSaveData } from '../../_data/GTBBairro/GTBBairroSaveData'; -import { GTBBairroInterface } from '../../_interfaces/GTBBairroInterface'; +import { GTBBairroSaveData } from '@/packages/administrativo/data/GTBBairro/GTBBairroSaveData'; +import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; async function executeGTBBairroSaveService(data: GTBBairroInterface) { const response = await GTBBairroSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts similarity index 77% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts rename to src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts index e337592..28668d6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts +++ b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts @@ -1,5 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBEstadoCivilIndexData } from '../../_data/GTBEstadoCivil/GTBEstadoCivilIndexData'; +import { GTBEstadoCivilIndexData } from '../../data/GTBEstadoCivil/GTBEstadoCivilIndexData'; async function executeGTBEstadoCivilIndexService() { const response = await GTBEstadoCivilIndexData(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilRemoveService.ts similarity index 66% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts rename to src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilRemoveService.ts index 1b75fb5..adf158d 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts +++ b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilRemoveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBEstadoCivilSaveData } from '../../_data/GTBEstadoCivil/GTBEstadoCivilSaveData'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; +import { GTBEstadoCivilSaveData } from '../../data/GTBEstadoCivil/GTBEstadoCivilSaveData'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; async function executeGTBEstadoCivilRemoveService(data: GTBEstadoCivilInterface) { const response = await GTBEstadoCivilSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilSaveService.ts similarity index 65% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts rename to src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilSaveService.ts index 1e32b0f..2e27c40 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts +++ b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilSaveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBEstadoCivilSaveData } from '../../_data/GTBEstadoCivil/GTBEstadoCivilSaveData'; -import { GTBEstadoCivilInterface } from '../../_interfaces/GTBEstadoCivilInterface'; +import { GTBEstadoCivilSaveData } from '../../data/GTBEstadoCivil/GTBEstadoCivilSaveData'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; async function executeGTBEstadoCivilSaveService(data: GTBEstadoCivilInterface) { const response = await GTBEstadoCivilSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoIndexService.ts b/src/packages/administrativo/services/GTBProfissao/GTBProfissaoIndexService.ts similarity index 56% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoIndexService.ts rename to src/packages/administrativo/services/GTBProfissao/GTBProfissaoIndexService.ts index b9eb47c..c0e6ec8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_profissao/GTBProfissaoIndexService.ts +++ b/src/packages/administrativo/services/GTBProfissao/GTBProfissaoIndexService.ts @@ -1,4 +1,4 @@ -import GTBProfissoesIndexData from '../../_data/GTBProfissao/GTBProfissaoIndexData'; +import GTBProfissoesIndexData from '@/packages/administrativo/data/GTBProfissao/GTBProfissaoIndexData'; export default async function GTBProfissaoIndexService() { const response = await GTBProfissoesIndexData(); diff --git a/src/packages/administrativo/services/GTBProfissao/GTBProfissaoRemoveService.ts b/src/packages/administrativo/services/GTBProfissao/GTBProfissaoRemoveService.ts new file mode 100644 index 0000000..433fac9 --- /dev/null +++ b/src/packages/administrativo/services/GTBProfissao/GTBProfissaoRemoveService.ts @@ -0,0 +1,8 @@ +import GTBProfissaoRemoveData from '@/packages/administrativo/data/GTBProfissao/GTBProfissaoRemoveData'; +import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; + +export default async function GTBProfissaoRemoveService(data: GTBProfissaoInterface) { + const response = await GTBProfissaoRemoveData(data); + + return response; +} diff --git a/src/packages/administrativo/services/GTBProfissao/GTBProfissaoSaveService.ts b/src/packages/administrativo/services/GTBProfissao/GTBProfissaoSaveService.ts new file mode 100644 index 0000000..198b82e --- /dev/null +++ b/src/packages/administrativo/services/GTBProfissao/GTBProfissaoSaveService.ts @@ -0,0 +1,7 @@ +import GTBProfissaoSaveData from '@/packages/administrativo/data/GTBProfissao/GTBProfissaoSaveData'; +import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; + +export default async function GTProfissaoSaveService(data: GTBProfissaoInterface) { + const response = await GTBProfissaoSaveData(data); + return response; +} diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensIndexService.ts b/src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensIndexService.ts similarity index 55% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensIndexService.ts rename to src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensIndexService.ts index 3b19a41..c2979ea 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensIndexService.ts +++ b/src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensIndexService.ts @@ -1,4 +1,4 @@ -import GTBRegimeBensIndexData from '../../_data/GTBRegimeBens/GTBRegimeBensIndexData'; +import GTBRegimeBensIndexData from '@/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensIndexData'; export default async function GTBRegimeBensIndexService() { const response = await GTBRegimeBensIndexData(); diff --git a/src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensRemoveService.ts b/src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensRemoveService.ts new file mode 100644 index 0000000..f3a043a --- /dev/null +++ b/src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensRemoveService.ts @@ -0,0 +1,8 @@ +import GTBRegimeBensRemoveData from '@/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensRemoveData'; +import GTBRegimeBensInterface from '@/packages/administrativo/interfaces/GTBRegimeBens/GTBRegimeBensInterface'; + +export default async function GTBRegimeBensRemoveService(data: GTBRegimeBensInterface) { + const response = await GTBRegimeBensRemoveData(data); + + return response; +} diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensSaveService.ts b/src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensSaveService.ts similarity index 64% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensSaveService.ts rename to src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensSaveService.ts index d2798fa..e8f3643 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimebens/GTBRegimeBensSaveService.ts +++ b/src/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensSaveService.ts @@ -1,5 +1,5 @@ -import { GTBRegimeBensSaveData } from '../../_data/GTBRegimeBens/GTBRegimeBensSaveData'; -import GTBRegimeBensInterface from '../../_interfaces/GTBRegimeBensInterface'; +import { GTBRegimeBensSaveData } from '@/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensSaveData'; +import GTBRegimeBensInterface from '@/packages/administrativo/interfaces/GTBRegimeBens/GTBRegimeBensInterface'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBRegimeBensSaveService(data: GTBRegimeBensInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService.ts b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService.ts similarity index 78% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService.ts rename to src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService.ts index 9f5f192..c8548f8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoIndexService.ts +++ b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService.ts @@ -1,5 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import GTBRegimeComunhaoIndexData from '../../_data/GTRegimeComunhao/GTBRegimeComunhaoIndexData'; +import GTBRegimeComunhaoIndexData from '../../data/GTRegimeComunhao/GTBRegimeComunhaoIndexData'; async function executeGTBRegimeComunhaoIndexService() { const response = await GTBRegimeComunhaoIndexData(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService.ts b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService.ts similarity index 65% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService.ts rename to src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService.ts index 006a4c0..51ac03f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoRemoveService.ts +++ b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import GTBRegimeComunhaoRemoveData from '../../_data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; +import GTBRegimeComunhaoRemoveData from '../../data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; async function executeGTBRegimeComunhaoRemoveService(data: GTBRegimeComunhaoInterface) { const response = await GTBRegimeComunhaoRemoveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService.ts b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService.ts similarity index 65% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService.ts rename to src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService.ts index cef3225..546dd08 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_regimecomunhao/GTBRegimeComunhaoSaveService.ts +++ b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import GTBRegimeComunhaoSaveData from '../../_data/GTRegimeComunhao/GTBRegimeComunhaoSaveData'; -import GTBRegimeComunhaoInterface from '../../_interfaces/GTBRegimeComunhaoInterface'; +import GTBRegimeComunhaoSaveData from '../../data/GTRegimeComunhao/GTBRegimeComunhaoSaveData'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; async function executeGTBRegimeComunhaoSaveService(data: GTBRegimeComunhaoInterface) { const response = await GTBRegimeComunhaoSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService.ts b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroIndexService.ts similarity index 77% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService.ts rename to src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroIndexService.ts index 8d8c3f6..778ffcc 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroIndexService.ts +++ b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroIndexService.ts @@ -1,5 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBTipoLogradouroIndexData } from '../../_data/GTBTipoLogradouro/GTBTipoLogradouroIndexData'; +import { GTBTipoLogradouroIndexData } from '../../data/GTBTipoLogradouro/GTBTipoLogradouroIndexData'; async function executeGTBTipoLogradouroIndexService() { const response = await GTBTipoLogradouroIndexData(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService.ts b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService.ts similarity index 64% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService.ts rename to src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService.ts index 0909e9e..64894be 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroRemoveService.ts +++ b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBTipoLogradouroRemoveData } from '../../_data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroRemoveData } from '../../data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; async function executeGTBTipoLogradouroRemoveService(data: GTBTipoLogradouroInterface) { const response = await GTBTipoLogradouroRemoveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService.ts b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroSaveService.ts similarity index 64% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService.ts rename to src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroSaveService.ts index be04889..674c8aa 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_tipologradouro/GTBTipoLogradouroSaveService.ts +++ b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroSaveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { GTBTipoLogradouroSaveData } from '../../_data/GTBTipoLogradouro/GTBTipoLogradouroSaveData'; -import { GTBTipoLogradouroInterface } from '../../_interfaces/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroSaveData } from '../../data/GTBTipoLogradouro/GTBTipoLogradouroSaveData'; +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; async function executeGTBTipoLogradouroSaveService(data: GTBTipoLogradouroInterface) { const response = await GTBTipoLogradouroSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_uf/GUfIndexService.ts b/src/packages/administrativo/services/GUF/GUfIndexService.ts similarity index 66% rename from src/app/(protected)/(cadastros)/cadastros/_services/g_uf/GUfIndexService.ts rename to src/packages/administrativo/services/GUF/GUfIndexService.ts index f07e7b5..9e7566f 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_uf/GUfIndexService.ts +++ b/src/packages/administrativo/services/GUF/GUfIndexService.ts @@ -1,4 +1,4 @@ -import GUfIndexData from '../../_data/GUf/GUfIndexData'; +import GUfIndexData from '../../data/GUf/GUfIndexData'; export default async function GUfIndexService() { const response = await GUfIndexData(); diff --git a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioIndex.ts b/src/packages/administrativo/services/GUsuario/GUsuarioIndex.ts similarity index 64% rename from src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioIndex.ts rename to src/packages/administrativo/services/GUsuario/GUsuarioIndex.ts index a5691f1..ac2d962 100644 --- a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioIndex.ts +++ b/src/packages/administrativo/services/GUsuario/GUsuarioIndex.ts @@ -1,6 +1,6 @@ 'use server'; -import GUsuarioIndexData from '../../_data/g_usuario/GUsuarioIndexData'; +import GUsuarioIndexData from '../../data/GUsuario/GUsuarioIndexData'; export default async function GUsuarioIndex() { const response = await GUsuarioIndexData(); diff --git a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioLogin.ts b/src/packages/administrativo/services/GUsuario/GUsuarioLogin.ts similarity index 91% rename from src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioLogin.ts rename to src/packages/administrativo/services/GUsuario/GUsuarioLogin.ts index bff9520..7729f6d 100644 --- a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioLogin.ts +++ b/src/packages/administrativo/services/GUsuario/GUsuarioLogin.ts @@ -2,7 +2,7 @@ import { cookies } from 'next/headers'; -import GUsuarioLoginData from '../../_data/g_usuario/GUsuarioLoginData'; +import GUsuarioLoginData from '../../data/GUsuario/GUsuarioLoginData'; import { redirect } from 'next/navigation'; export default async function GUsuarioLoginService(form: any) { diff --git a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioLogoutService.ts b/src/packages/administrativo/services/GUsuario/GUsuarioLogoutService.ts similarity index 100% rename from src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioLogoutService.ts rename to src/packages/administrativo/services/GUsuario/GUsuarioLogoutService.ts diff --git a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioRead.ts b/src/packages/administrativo/services/GUsuario/GUsuarioRead.ts similarity index 81% rename from src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioRead.ts rename to src/packages/administrativo/services/GUsuario/GUsuarioRead.ts index 4910655..9c349fe 100644 --- a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioRead.ts +++ b/src/packages/administrativo/services/GUsuario/GUsuarioRead.ts @@ -1,6 +1,6 @@ 'use server'; -import GUsuarioReadData from '../../_data/g_usuario/GUsuarioReadData'; +import GUsuarioReadData from '../../data/GUsuario/GUsuarioReadData'; export default async function GUsuarioRead(usuarioId: number) { // Verifica se o id informado é válido diff --git a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioSave.ts b/src/packages/administrativo/services/GUsuario/GUsuarioSave.ts similarity index 61% rename from src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioSave.ts rename to src/packages/administrativo/services/GUsuario/GUsuarioSave.ts index ddcce67..abe07df 100644 --- a/src/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioSave.ts +++ b/src/packages/administrativo/services/GUsuario/GUsuarioSave.ts @@ -1,6 +1,6 @@ 'use server'; -import GUsuarioSaveData from '../../_data/g_usuario/GUsuarioSaveData'; +import GUsuarioSaveData from '../../data/GUsuario/GUsuarioSaveData'; export default async function GUsuarioSave(form: any) { return await GUsuarioSaveData(form); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecDeleteService.ts b/src/packages/administrativo/services/TCensec/TCensecDeleteService.ts similarity index 69% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecDeleteService.ts rename to src/packages/administrativo/services/TCensec/TCensecDeleteService.ts index 6846f9e..c043606 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecDeleteService.ts +++ b/src/packages/administrativo/services/TCensec/TCensecDeleteService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { TCensecDeleteData } from '../../_data/TCensec/TCensecDeleteData'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; +import { TCensecDeleteData } from '../../data/TCensec/TCensecDeleteData'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; async function executeTCensecDeleteService(data: TCensecInterface) { const response = await TCensecDeleteData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecIndexService.ts b/src/packages/administrativo/services/TCensec/TCensecIndexService.ts similarity index 81% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecIndexService.ts rename to src/packages/administrativo/services/TCensec/TCensecIndexService.ts index 52971e0..09624e4 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecIndexService.ts +++ b/src/packages/administrativo/services/TCensec/TCensecIndexService.ts @@ -1,5 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { TCensecIndexData } from '../../_data/TCensec/TCensecIndexData'; +import { TCensecIndexData } from '../../data/TCensec/TCensecIndexData'; export default async function executeTCensecIndexService() { const response = await TCensecIndexData(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecSaveService.ts b/src/packages/administrativo/services/TCensec/TCensecSaveService.ts similarity index 69% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecSaveService.ts rename to src/packages/administrativo/services/TCensec/TCensecSaveService.ts index e3a2687..03c5a88 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec/TCensecSaveService.ts +++ b/src/packages/administrativo/services/TCensec/TCensecSaveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { TCensecSaveData } from '../../_data/TCensec/TCensecSaveData'; -import TCensecInterface from '../../_interfaces/TCensecInterface'; +import { TCensecSaveData } from '../../data/TCensec/TCensecSaveData'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; async function executeTCensecSaveService(data: TCensecInterface) { const response = await TCensecSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService.ts b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService.ts similarity index 75% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService.ts rename to src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService.ts index 520435d..00a98ef 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioIndexService.ts +++ b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService.ts @@ -1,5 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { TCensecNaturezaLitigioIndexData } from '../../_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData'; +import { TCensecNaturezaLitigioIndexData } from '../../data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData'; async function executeTCensecNaturezaLitigioIndexService() { const response = await TCensecNaturezaLitigioIndexData(); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioRemoveService.ts b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveService.ts similarity index 63% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioRemoveService.ts rename to src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveService.ts index 6387bff..804fe85 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioRemoveService.ts +++ b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveService.ts @@ -1,5 +1,5 @@ -import { TCensecNaturezaLitigioRemoveData } from '../../_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioRemoveData } from '../../data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData'; +import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecNaturezaLitigioRemoveService(data: TCensecNaturezaLitigioInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService.ts b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService.ts similarity index 63% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService.ts rename to src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService.ts index 1ab36a9..58304f8 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censecnaturezalitigio/TCensecNaturezaLitigioSaveService.ts +++ b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { TCensecNaturezaLitigioSaveData } from '../../_data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData'; -import { TCensecNaturezaLitigioInterface } from '../../_interfaces/TCensecNaturezaLitigioInterface'; +import { TCensecNaturezaLitigioSaveData } from '../../data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData'; +import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; async function executeTCensecNaturezaLitigioSaveService(data: TCensecNaturezaLitigioInterface) { const response = await TCensecNaturezaLitigioSaveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoIndexService.ts b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts similarity index 79% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoIndexService.ts rename to src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts index 5c1d7e2..ed4e4f0 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoIndexService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts @@ -1,5 +1,5 @@ import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TCensecTipoAtoIndexData } from "../../_data/TCensecTipoAto/GMedidaTipoIndexData"; +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/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts similarity index 66% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoRemoveService.ts rename to src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts index 260bb69..0a6b4e1 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoRemoveService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TCensecTipoAtoRemoveData } from "../../_data/TCensecTipoAto/GMedidaTipoRemoveData"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; +import { TCensecTipoAtoRemoveData } from "../../data/TCensecTipoAto/GMedidaTipoRemoveData"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; async function executeTCensecTipoAtoRemoveService(data: TCensecTipoAtoInterface) { diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoSaveService.ts b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts similarity index 66% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoSaveService.ts rename to src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts index 050c8b6..da56012 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_censec_tipoato/TCensecTipoAtoSaveService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts @@ -1,6 +1,6 @@ import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TCensecTipoAtoSaveData } from "../../_data/TCensecTipoAto/GMedidaTipoSaveData"; -import { TCensecTipoAtoInterface } from "../../_interfaces/TCensecTipoAtoInterface"; +import { TCensecTipoAtoSaveData } from "../../data/TCensecTipoAto/GMedidaTipoSaveData"; +import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; async function executeTCensecTipoAtoSaveService(data: TCensecTipoAtoInterface) { diff --git a/src/packages/administrativo/services/TMinuta/TMinutaIndex.ts b/src/packages/administrativo/services/TMinuta/TMinutaIndex.ts new file mode 100644 index 0000000..98c1a8b --- /dev/null +++ b/src/packages/administrativo/services/TMinuta/TMinutaIndex.ts @@ -0,0 +1,7 @@ +import TMinutaIndexData from '../../data/TMinuta/TMinutaIndexData'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; + +export default async function TMinutaIndex() { + const response = await TMinutaIndexData(); + return response; +} diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaIndexService.ts b/src/packages/administrativo/services/TMinuta/TMinutaIndexService.ts similarity index 51% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaIndexService.ts rename to src/packages/administrativo/services/TMinuta/TMinutaIndexService.ts index 635d939..a56d342 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaIndexService.ts +++ b/src/packages/administrativo/services/TMinuta/TMinutaIndexService.ts @@ -1,5 +1,5 @@ -import TMinutaIndex from '../../_data/TMinuta/TMinutaIndex'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; +import TMinutaIndex from '../../data/TMinuta/TMinutaIndex'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; export default async function TMinutaIndexService(t_minuta_id: number) { const response = await TMinutaIndex(t_minuta_id); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaRemoveService.ts b/src/packages/administrativo/services/TMinuta/TMinutaRemoveService.ts similarity index 50% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaRemoveService.ts rename to src/packages/administrativo/services/TMinuta/TMinutaRemoveService.ts index 2afecfa..b80ad45 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaRemoveService.ts +++ b/src/packages/administrativo/services/TMinuta/TMinutaRemoveService.ts @@ -1,5 +1,5 @@ -import TMinutaRemoveData from '../../_data/TMinuta/TMinutaRemoveData'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; +import TMinutaRemoveData from '../../data/TMinuta/TMinutaRemoveData'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; export default async function TMinutaRemoveService(data: TMinutaInterface) { const response = await TMinutaRemoveData(data); diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaSaveService.ts b/src/packages/administrativo/services/TMinuta/TMinutaSaveService.ts similarity index 50% rename from src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaSaveService.ts rename to src/packages/administrativo/services/TMinuta/TMinutaSaveService.ts index 94784da..424f77b 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/t_minuta/TMinutaSaveService.ts +++ b/src/packages/administrativo/services/TMinuta/TMinutaSaveService.ts @@ -1,5 +1,5 @@ -import TMinutaSaveData from '../../_data/TMinuta/TMinutaSaveData'; -import { TMinutaInterface } from '../../_interfaces/TMinutaInterface'; +import TMinutaSaveData from '../../data/TMinuta/TMinutaSaveData'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; export default async function TMinutaSaveService(data: TMinutaInterface) { const response = await TMinutaSaveData(data); From 8d5e786f74a11dde120a4131ef2bf60fae586ce9 Mon Sep 17 00:00:00 2001 From: keven Date: Sat, 18 Oct 2025 12:27:02 -0300 Subject: [PATCH 08/11] =?UTF-8?q?fix(Formatter):=20Formata=20o=20c=C3=B3di?= =?UTF-8?q?go=20utilizando=20o=20prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/GCidade/GCidadeForm.tsx | 4 +- .../components/GCidade/GCidadeIndex.tsx | 241 +++++---- .../components/GNatureza/GNaturezaColumns.tsx | 211 ++++---- .../components/GNatureza/GNaturezaForm.tsx | 37 +- .../components/GNatureza/GNaturezaIndex.tsx | 22 +- .../components/GNatureza/GNaturezaTable.tsx | 12 +- .../components/GTBBairro/GTBBairroForm.tsx | 8 +- .../components/GTBBairro/GTBBairroSelect.tsx | 183 ++++--- .../TAtoParteTipo/TAtoParteTipoColumns.tsx | 227 +++++---- .../TAtoParteTipo/TAtoParteTipoForm.tsx | 33 +- .../TAtoParteTipo/TAtoParteTipoIndex.tsx | 5 +- .../TAtoParteTipo/TAtoParteTipoTable.tsx | 8 +- .../TCensecQualidadeColumns.tsx | 131 +++-- .../TCensecQualidade/TCensecQualidadeForm.tsx | 29 +- .../TCensecQualidadeIndex.tsx | 5 +- .../TCensecQualidadeSelect.tsx | 172 +++---- .../TCensecQualidadeTable.tsx | 8 +- .../TCensecQualidadeAtoColumns.tsx | 28 +- .../TCensecQualidadeAtoForm.tsx | 14 +- .../TCensecQualidadeAtoFormColumns.tsx | 116 ++--- .../TCensecQualidadeAtoIndex.tsx | 18 +- .../TCensecQualidadeAtoTable.tsx | 9 +- .../TCensecTipoAto/TCensecTipoAtoForm.tsx | 464 +++++++++--------- .../TCensecTipoAto/TCensecTipoAtoIndex.tsx | 38 +- .../TCensecTipoAto/TCensecTipoAtoSelect.tsx | 172 +++---- .../TCensecTipoAto/TCensecTipoAtoTable.tsx | 50 +- .../TCensecTipoNaturezaColumns.tsx | 177 ++++--- .../TCensecTipoNaturezaForm.tsx | 37 +- .../TCensecTipoNaturezaIndex.tsx | 5 +- .../TCensecTipoNaturezaTable.tsx | 8 +- .../components/TImovel/TImovelColumns.tsx | 218 ++++---- .../components/TImovel/TImovelForm.tsx | 65 ++- .../components/TImovel/TImovelIndex.tsx | 19 +- .../components/TImovel/TImovelTable.tsx | 2 +- .../TImovel/TImovelTipoConstrucaoSelect.tsx | 130 ++--- .../TImovel/TImovelTipoImovelSelect.tsx | 123 ++--- .../TImovel/TImovelTipoLogradouroSelect.tsx | 172 +++---- .../TImovel/TImovelTipoRegistroSelect.tsx | 126 ++--- .../TImovelUnidadeRuralColumns.tsx | 163 +++--- .../TImovelUnidadeRuralForm.tsx | 71 ++- .../TImovelUnidadeRuralIndex.tsx | 17 +- .../TImovelUnidadeRuralTable.tsx | 14 +- .../TImovelUnidadeUrbanoColumns.tsx | 163 +++--- .../TImovelUnidadeUrbanoForm.tsx | 36 +- .../TImovelUnidadeUrbanoIndex.tsx | 10 +- .../TImovelUnidadeUrbanoTable.tsx | 8 +- .../TPessoaFisica/TPessoaFisicaColumns.tsx | 29 +- .../TPessoaFisica/TPessoaFisicaForm.tsx | 38 +- .../TPessoaFisica/TPessoaFisicaIndex.tsx | 7 +- .../TPessoaFisica/TPessoaFisicaTable.tsx | 6 +- .../TPessoaJuridicaColumns.tsx | 297 +++++------ .../TPessoaJuridica/TPessoaJuridicaForm.tsx | 15 +- .../TPessoaJuridica/TPessoaJuridicaIndex.tsx | 267 +++++----- .../TPessoaRepresentanteColumns.tsx | 28 +- .../TPessoaRepresentanteForm.tsx | 5 +- .../TPessoaRepresentanteIndex.tsx | 14 +- .../TPessoaRepresentanteTable.tsx | 9 +- .../TPessoasRepresentanteFormColumns.tsx | 230 ++++----- .../data/GCidade/GCidadeIndexData.ts | 3 +- .../data/GCidade/GCidadeRemoveData.ts | 1 - .../data/GCidade/GCidadeSaveData.ts | 1 - .../data/GNatureza/GNaturezaDeleteData.ts | 26 +- .../data/GNatureza/GNaturezaIndexData.ts | 26 +- .../data/GNatureza/GNaturezaSaveData.ts | 34 +- .../TAtoTipoParte/TAtoTipoParteDeleteData.ts | 28 +- .../TAtoTipoParte/TAtoTipoParteIndexData.ts | 20 +- .../TAtoTipoParte/TAtoTipoParteSaveData.ts | 38 +- .../TCensecQualidadeDeleteData.ts | 28 +- .../TCensecQualidadeIndexData.ts | 20 +- .../TCensecQualidadeSaveData.ts | 38 +- .../TCensecQualidadeAtoIndexData.ts | 4 +- .../TCensecQualidadeAtoRemoveData.ts | 4 +- .../TCensecQualidadeAtoSaveData.ts | 5 +- .../TCensecTipoAto/GMedidaTipoIndexData.ts | 19 +- .../TCensecTipoAto/GMedidaTipoRemoveData.ts | 22 +- .../TCensecTipoAto/GMedidaTipoSaveData.ts | 26 +- .../TCensecTipoNaturezaDeleteData.ts | 30 +- .../TCensecTipoNaturezaIndexData.ts | 22 +- .../TCensecTipoNaturezaSaveData.ts | 42 +- .../data/TImovel/TImovelDeleteData.ts | 24 +- .../data/TImovel/TImovelIndexData.ts | 26 +- .../data/TImovel/TImovelSaveData.ts | 34 +- .../TImovelUnidadeRuralDeleteData.ts | 22 +- .../TImovelUnidadeRuralIndexData.ts | 24 +- .../TImovelUnidadeRuralSaveData.ts | 36 +- .../TImovelUnidadeUrbanoDeleteData.ts | 24 +- .../TImovelUnidadeUrbanoIndexData.ts | 22 +- .../TImovelUnidadeUrbanoSaveData.ts | 34 +- .../TPessoaFisica/TPessoaFisicaRemoveData.ts | 2 +- .../TPessoaJuridicaIndexData.ts | 2 +- .../TPessoaRepresentanteIndexData.ts | 4 +- .../TPessoaRepresentanteRemoveData.ts | 4 +- .../TPessoaRepresentanteSaveData.ts | 5 +- .../hooks/GCidade/useGCidadeRemoveHook.ts | 6 +- .../hooks/GCidade/useGCidadeSaveHook.ts | 3 +- .../hooks/GNatureza/useGNaturezaDeleteHook.ts | 8 +- .../hooks/GNatureza/useGNaturezaFormHook.ts | 6 +- .../hooks/GNatureza/useGNaturezaIndexHook.ts | 8 +- .../hooks/GNatureza/useGNaturezaSaveHook.ts | 10 +- .../hooks/GTBBairro/useGTBBairroReadHook.ts | 1 - .../useGTBTipoLogradouroReadHook.ts | 7 +- .../TAtoParteTipo/useTAtoParteTipoFormHook.ts | 11 +- .../useTAtoParteTipoIndexHook.ts | 2 +- .../useTCensecQualidadeHook.ts | 11 +- .../useTCensecQualidadeIndexHook.ts | 2 +- .../useTCensecQualidadeAtoFormHook.ts | 25 +- .../useTCensecQualidadeAtoIndexHook.ts | 5 +- .../useTCensecTipoAtoReadHook.ts | 30 +- .../useTCensecTipoAtoRemoveHook.ts | 24 +- .../useTCensecTipoAtoSaveHook.ts | 36 +- .../useTCensecTipoNaturezaFormHook.ts | 11 +- .../useTCensecTipoNaturezaIndexHook.ts | 6 +- .../hooks/TImovel/useTImovelFormHook.ts | 8 +- .../hooks/TImovel/useTImovelIndexHook.ts | 2 +- .../useTImovelUnidadeRuralFormHook.ts | 11 +- .../useTImovelUnidadeRuralIndexHook.ts | 6 +- .../useTImovelUnidadeRuralSaveHook.ts | 1 - .../useTImovelUnidadeUrbanoFormHook.ts | 15 +- .../useTImovelUnidadeUrbanoIndexHook.ts | 7 +- .../useTImovelUnidadeUrbanoSaveHook.ts | 2 - .../useTPessoaFisicaDeleteHook.ts | 2 +- .../TPessoaFisica/useTPessoaFisicaFormHook.ts | 25 +- .../TPessoaFisica/useTPessoaFisicaSaveHook.ts | 1 - .../useTPessoaJuridicaFormHook.ts | 25 +- .../useTPessoaJuridicaSaveHook.ts | 2 +- .../useTPessoaRepresentanteFormHook.ts | 25 +- .../useTPessoaRepresentanteIndexHook.ts | 5 +- .../GNatureza/GNaturezaFormInterface.ts | 4 +- .../GNatureza/GNaturezaIndexInterface.ts | 4 +- .../GNatureza/GNaturezaInterface.ts | 14 +- .../GNatureza/GNaturezaTableInterface.ts | 10 +- .../GTBBairro/GTBairroSelectInterface.ts | 10 +- .../TAtoParteTipoFormInterface.ts | 4 +- .../TAtoParteTipo/TAtoParteTipoInterface.ts | 20 +- .../TAtoParteTipoTableInterface.ts | 10 +- .../TCensecNaturezaLitigioInterface.ts | 2 +- .../TCensecQualidadeFormInterface.ts | 4 +- .../TCensecQualidadeInterface.ts | 14 +- .../TCensecQualidadeTableInterface.ts | 10 +- .../TCensecQualidadeAtoFormInterface.ts | 12 +- .../TCensecQualidadeAtoInterface.ts | 10 +- .../TCensecQualidadeAtoJoinedInterface.ts | 6 +- .../TCensecQualidadeAtoPageInterface.ts | 4 +- .../TCensecQualidadeAtoTableInterface.ts | 10 +- .../TCensecTipoAto/TCensecTipoAtoInterface.ts | 8 +- .../TCensecTipoNaturezaFormInterface.ts | 4 +- .../TCensecTipoNaturezaInterface.ts | 18 +- .../TCensecTipoNaturezaTableInterface.ts | 10 +- .../TImovel/TImovelFormInterface.ts | 4 +- .../TImovel/TImovelIndexDataInterface.ts | 4 +- .../TImovel/TImovelIndexInterface.ts | 8 +- .../interfaces/TImovel/TImovelInterface.ts | 30 +- .../TImovel/TImovelTabelInterface.ts | 10 +- .../TImovelUnidade/TImovelUnidadeInterface.ts | 2 +- .../TImovelUnidadePageInterface.ts | 4 +- .../TImovelUnidadeRural.ts | 4 +- .../TImovelUnidadeRuralFormInterface.ts | 4 +- .../TImovelUnidadeRuralTableInterface.ts | 4 +- .../TImovelUnidadeUrbanoFormInterface.ts | 2 +- .../TImovelUnidadeUrbanoInterface.ts | 2 +- .../TImovelUnidadeUrbanoTableInterface.ts | 4 +- .../TPessoaFisicaFormInterface.ts | 14 +- .../TPessoaFisica/TPessoaFisicaInterface.ts | 62 +-- .../TPessoaFisicaTableInterface.ts | 10 +- .../TPessoa/TPessoaIndexDataInterface.ts | 2 +- .../interfaces/TPessoa/TPessoaInterface.ts | 2 +- .../TPessoaJuridicaFormInterface.ts | 14 +- .../TPessoaJuridicaInterface.ts | 18 +- .../TPessoaJuridicaTableInterface.ts | 10 +- .../TPessoaRepresentanteInterface.ts | 16 +- .../TPessoaRepresentanteJoinedInterface.ts | 14 +- .../TPessoaRepresentantePageInterface.ts | 4 +- .../TPessoaRepresentanteTableInterface.ts | 10 +- .../TPessoaRepresentnateFormInterface.ts | 12 +- .../schemas/GNatureza/GNaturezaSchema.ts | 16 +- .../TAtoParteTipo/TAtoParteTipoSchema.ts | 22 +- .../TCensecQualdiadeSchema.ts | 16 +- .../TCensecQualidadeAtoSchema.ts | 12 +- .../TCensecTipoAto/TCensecTipoAtoSchema.ts | 16 +- .../TCensecTipoNaturezaSchema.ts | 20 +- .../schemas/TImovel/TImovelSchema.ts | 32 +- .../TImovelUnidadeRuralSchema.ts | 22 +- .../TImovelUnidade/TImovelUnidadeSchema.ts | 16 +- .../TImovelUnidadeUrbanoSchema.ts | 34 +- .../schemas/TPessoa/TPessoaFisicaSchema.ts | 4 +- .../schemas/TPessoa/TPessoaJuridicaSchema.ts | 22 +- .../TPessoaRepresentanteSchema.ts | 2 +- .../GNatureza/GNaturezaDeleteService.ts | 6 +- .../GNatureza/GNaturezaIndexService.ts | 8 +- .../GNatureza/GNaturezaSaveService.ts | 8 +- .../GTBEstadoCivilIndexService.ts | 2 +- .../TAtoParteTipo/TAtoParteTipoSaveService.ts | 2 +- .../TCensecQualidadeDeleteService.ts | 4 +- .../TCensecQualidadeIndexService.ts | 4 +- .../TCensecQualidadeSaveService.ts | 4 +- .../TCensecQualidadeAtoIndexService.ts | 4 +- .../TCensecQualidadeAtoRemoveService.ts | 2 +- .../TCensecQualidadeAtoSaveService.ts | 2 +- .../TCensecTipoAtoIndexService.ts | 11 +- .../TCensecTipoAtoRemoveService.ts | 16 +- .../TCensecTipoAtoSaveService.ts | 14 +- .../TCensecTipoNaturezaDeleteService.ts | 4 +- .../TCensecTipoNaturezaIndexService.ts | 4 +- .../TCensecTipoNaturezaSaveService.ts | 4 +- .../services/TImovel/TImovelSaveService.ts | 2 +- .../TImovelUnidadeRuralDeleteService.ts | 4 +- .../TImovelUnidadeRuralIndexService.ts | 10 +- .../TImovelUnidadeRuralSaveService.ts | 4 +- .../TImovelUnidadeUrbanoDeleteService.ts | 5 +- .../TImovelUnidadeUrbanoIndexService.ts | 8 +- .../TImovelUnidadeUrbanoSaveService.ts | 4 +- .../TPessoaFisicaIndexService.ts | 4 +- .../TPessoaFisicaRemoveService.ts | 4 +- .../TPessoaFisica/TPessoaFisicaSaveService.ts | 5 +- .../TPessoaJuridicaSaveService.ts | 4 +- .../TPessoaRepresentanteIndexService.ts | 4 +- .../TPessoaRepresentanteRemoveService.ts | 2 +- .../TPessoaRepresentanteSaveService.ts | 2 +- src/shared/actions/CEP/FormatCEP.ts | 16 +- src/shared/actions/form/ResetFormIfData.ts | 28 +- src/shared/actions/form/normalizeFormData.ts | 21 +- .../confirmacao/ConfirmacaoSelect.tsx | 123 ++--- src/shared/components/dataTable/DataTable.tsx | 81 ++- .../components/dataTable/SortableHeader.tsx | 17 +- .../interfaces/DataTableInterface.ts | 18 +- .../loadingButton/LoadingButton.tsx | 11 +- .../components/situacoes/SituacoesSelect.tsx | 125 ++--- .../tipoAtoAnterior/TipoAtoAnteriorSelect.tsx | 123 ++--- .../tipoDaParte/TipoDaParteSelect.tsx | 150 +++--- .../tipoNatureza/TipoNaturezaSelect.tsx | 190 ++++--- src/shared/enums/ImovelConstrucaoEnum.ts | 8 +- src/shared/enums/ImovelTipoClasseEnum.ts | 6 +- src/shared/enums/ImovelTipoEnum.ts | 42 +- src/shared/enums/ImovelTipoRegistro.ts | 8 +- src/shared/enums/TIpoDaParteEnum.ts | 14 +- src/shared/enums/TipoAtoAnteriorEnum.ts | 14 +- src/shared/enums/TipoNaturezaEnum.ts | 10 +- .../api/interfaces/ApiResponseInterface.ts | 8 +- 238 files changed, 3834 insertions(+), 3835 deletions(-) diff --git a/src/packages/administrativo/components/GCidade/GCidadeForm.tsx b/src/packages/administrativo/components/GCidade/GCidadeForm.tsx index df4a3f5..d12962a 100644 --- a/src/packages/administrativo/components/GCidade/GCidadeForm.tsx +++ b/src/packages/administrativo/components/GCidade/GCidadeForm.tsx @@ -67,7 +67,6 @@ export default function GCidadeForm({ isOpen, data, onClose, onSave }: Props) { // Quando recebe dados para edição, atualiza os valores do formulário useEffect(() => { - if (data) { // Se for edição, carrega os dados recebidos form.reset({ @@ -88,7 +87,7 @@ export default function GCidadeForm({ isOpen, data, onClose, onSave }: Props) { }); } - // Carrega todos os estados + // Carrega todos os estados // brasileiros para o formulário const loadData = async () => { // Aguarda a busca terminar @@ -97,7 +96,6 @@ export default function GCidadeForm({ isOpen, data, onClose, onSave }: Props) { // Dispara a função loadData(); - }, [data, form]); return ( diff --git a/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx b/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx index 624aff9..053e146 100644 --- a/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx +++ b/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx @@ -18,146 +18,145 @@ import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCida import Header from '@/shared/components/structure/Header'; export default function GCidadeIndex() { - // Hooks para leitura e salvamento - const { gCidade, fetchGCidade } = useGCidadeReadHook(); - const { saveGCidade } = useGCidadeSaveHook(); - const { removeGCidade } = useGCidadeRemoveHook(); + // Hooks para leitura e salvamento + const { gCidade, fetchGCidade } = useGCidadeReadHook(); + const { saveGCidade } = useGCidadeSaveHook(); + const { removeGCidade } = useGCidadeRemoveHook(); - // Estados - const [selectedCidade, setSelectedCidade] = useState(null); - const [isFormOpen, setIsFormOpen] = useState(false); + // Estados + const [selectedCidade, setSelectedCidade] = useState(null); + const [isFormOpen, setIsFormOpen] = useState(false); - // Estado para saber qual item será deletado - const [itemToDelete, setItemToDelete] = useState(null); + // 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(); + /** + * 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: GCidadeInterface | null) => { - setSelectedCidade(data); - setIsFormOpen(true); - }, []); + /** + * Abre o formulário no modo de edição ou criação + */ + const handleOpenForm = useCallback((data: GCidadeInterface | null) => { + setSelectedCidade(data); + setIsFormOpen(true); + }, []); - /** - * Fecha o formulário e limpa o andamento selecionado - */ - const handleCloseForm = useCallback((_: null, __: boolean) => { - setSelectedCidade(null); - setIsFormOpen(false); - }, []); + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback((_: null, __: boolean) => { + setSelectedCidade(null); + setIsFormOpen(false); + }, []); - /** - * Salva os dados do formulário - */ - const handleSave = useCallback(async (formData: GCidadeInterface) => { + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: GCidadeInterface) => { + // Aguarda salvar o registro + await saveGCidade(formData); - - // Aguarda salvar o registro - await saveGCidade(formData); - - // Atualiza a lista de dados - fetchGCidade(); + // Atualiza a lista de dados + fetchGCidade(); }, - [saveGCidade, fetchGCidade], - ); + [saveGCidade, fetchGCidade], + ); - /** - * Quando o usuário clica em "remover" na tabela - */ - const handleConfirmDelete = useCallback( - (item: GCidadeInterface) => { - // Define o item atual para remoção - setItemToDelete(item); + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: GCidadeInterface) => { + // Define o item atual para remoção + setItemToDelete(item); - // Abre o modal de confirmação - openConfirmDialog(); - }, - [openConfirmDialog], - ); + // 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 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 removeGCidade(itemToDelete); + // Executa o Hook de remoção + await removeGCidade(itemToDelete); - // Atualiza a lista - await fetchGCidade(); + // Atualiza a lista + await fetchGCidade(); - // Limpa o item selecionado - setItemToDelete(null); + // Limpa o item selecionado + setItemToDelete(null); - // Fecha o modal - handleCancel(); - }, [itemToDelete, fetchGCidade, handleCancel]); + // Fecha o modal + handleCancel(); + }, [itemToDelete, fetchGCidade, handleCancel]); - /** - * Busca inicial dos dados - */ - useEffect(() => { - fetchGCidade(); - }, []); + /** + * Busca inicial dos dados + */ + useEffect(() => { + fetchGCidade(); + }, []); - /** - * Tela de loading enquanto carrega os dados - */ - if (!gCidade) { - return ; - } + /** + * Tela de loading enquanto carrega os dados + */ + if (!gCidade) { + return ; + } - return ( -
- {/* Cabeçalho */} -
{ - handleOpenForm(null); - }} - /> + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> - {/* Tabela de andamentos */} - - - - - + {/* Tabela de andamentos */} + + + + + - {/* Modal de confirmação */} - + {/* Modal de confirmação */} + - {/* Formulário de criação/edição */} - -
- ); - 4; + {/* Formulário de criação/edição */} + +
+ ); + 4; } diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx index 8eb06f3..fb89c15 100644 --- a/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx +++ b/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx @@ -1,123 +1,118 @@ -import { ColumnDef } from "@tanstack/react-table"; -import { Button } from "@/components/ui/button"; +import { ColumnDef } from '@tanstack/react-table'; +import { Button } from '@/components/ui/button'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; 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 GetCapitalize from "@/shared/actions/text/GetCapitalize"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; export default function GNaturezaColumns( - onEdit: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void, - onDelete: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void + onEdit: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void, ): ColumnDef[] { - return [ - // ID - { - accessorKey: "natureza_id", - header: ({ column }) => SortableHeader("ID", column), - cell: ({ row }) => Number(row.getValue("natureza_id")), - enableSorting: true, - }, + return [ + // ID + { + accessorKey: 'natureza_id', + header: ({ column }) => SortableHeader('ID', column), + cell: ({ row }) => Number(row.getValue('natureza_id')), + enableSorting: true, + }, - // Descrição - { - accessorKey: "descricao", - header: ({ column }) => SortableHeader("Descrição", column), - cell: ({ row }) => - GetCapitalize(String(row.getValue("descricao") || "")), - }, + // Descrição + { + accessorKey: 'descricao', + header: ({ column }) => SortableHeader('Descrição', column), + cell: ({ row }) => GetCapitalize(String(row.getValue('descricao') || '')), + }, - // Situação - { - accessorKey: "situacao", - header: ({ column }) => SortableHeader("Situação", column), - cell: ({ row }) => { - const value = String(row.getValue("situacao") || "").toUpperCase(); - if (value === "A") return "Ativo"; - if (value === "I") return "Inativo"; - return "-"; - }, - }, + // Situação + { + accessorKey: 'situacao', + header: ({ column }) => SortableHeader('Situação', column), + cell: ({ row }) => { + const value = String(row.getValue('situacao') || '').toUpperCase(); + if (value === 'A') return 'Ativo'; + if (value === 'I') return 'Inativo'; + return '-'; + }, + }, - // Sistema ID - { - accessorKey: "sistema_id", - header: ({ column }) => SortableHeader("Sistema ID", column), - cell: ({ row }) => { - const value = row.getValue("sistema_id"); - return value ? Number(value) : "-"; - }, - }, + // Sistema ID + { + accessorKey: 'sistema_id', + header: ({ column }) => SortableHeader('Sistema ID', column), + cell: ({ row }) => { + const value = row.getValue('sistema_id'); + return value ? Number(value) : '-'; + }, + }, - // Pedir Número Imóvel - { - accessorKey: "pedir_numero_imovel", - header: ({ column }) => SortableHeader("Pedir Nº Imóvel", column), - cell: ({ row }) => { - const value = String(row.getValue("pedir_numero_imovel") || "").toUpperCase(); - return value === "S" ? "Sim" : "Não"; - }, - }, + // Pedir Número Imóvel + { + accessorKey: 'pedir_numero_imovel', + header: ({ column }) => SortableHeader('Pedir Nº Imóvel', column), + cell: ({ row }) => { + const value = String(row.getValue('pedir_numero_imovel') || '').toUpperCase(); + return value === 'S' ? 'Sim' : 'Não'; + }, + }, - // Controle Frente/Verso - { - accessorKey: "controle_frenteverso", - header: ({ column }) => SortableHeader("Controle Frente/Verso", column), - cell: ({ row }) => { - const value = String(row.getValue("controle_frenteverso") || "").toUpperCase(); - return value === "S" ? "Sim" : "Não"; - }, - }, + // Controle Frente/Verso + { + accessorKey: 'controle_frenteverso', + header: ({ column }) => SortableHeader('Controle Frente/Verso', column), + cell: ({ row }) => { + const value = String(row.getValue('controle_frenteverso') || '').toUpperCase(); + return value === 'S' ? 'Sim' : 'Não'; + }, + }, - // Ações - { - id: "actions", - header: "Ações", - cell: ({ row }) => { - const natureza = row.original; + // Ações + { + id: 'actions', + header: 'Ações', + cell: ({ row }) => { + const natureza = row.original; - return ( - - - - + return ( + + + + - - - onEdit(natureza, true)}> - - Editar - + + + onEdit(natureza, true)}> + + Editar + - + - onDelete(natureza, true)} - > - - Remover - - - - - ); - }, - enableSorting: false, - enableHiding: false, - }, - ]; + onDelete(natureza, true)} + > + + Remover + + + + + ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; } diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx index 3673053..efe4212 100644 --- a/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx +++ b/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx @@ -1,7 +1,7 @@ 'use client'; -import React, { useEffect } from "react"; -import { Button } from "@/components/ui/button"; +import React, { useEffect } from 'react'; +import { Button } from '@/components/ui/button'; import { Dialog, DialogClose, @@ -10,7 +10,7 @@ import { DialogFooter, DialogHeader, DialogTitle, -} from "@/components/ui/dialog"; +} from '@/components/ui/dialog'; import { Form, FormControl, @@ -18,15 +18,15 @@ import { FormItem, FormLabel, FormMessage, -} from "@/components/ui/form"; -import { Input } from "@/components/ui/input"; -import { Switch } from "@/components/ui/switch"; +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; +import { Switch } from '@/components/ui/switch'; -import LoadingButton from "@/shared/components/loadingButton/LoadingButton"; -import { ResetFormIfData } from "@/shared/actions/form/ResetFormIfData"; -import { useGNaturezaFormHook } from "../../hooks/GNatureza/useGNaturezaFormHook"; -import { GNaturezaFormInterface } from "../../interfaces/GNatureza/GNaturezaFormInterface"; -import SituacoesSelect from "@/shared/components/situacoes/SituacoesSelect"; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import { useGNaturezaFormHook } from '../../hooks/GNatureza/useGNaturezaFormHook'; +import { GNaturezaFormInterface } from '../../interfaces/GNatureza/GNaturezaFormInterface'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; /** * Formulário de cadastro/edição de Natureza @@ -47,7 +47,7 @@ export default function GNaturezaForm({ }, [data, form]); function onError(error: any) { - console.log("Erro no formulário:", error); + console.log('Erro no formulário:', error); } return ( @@ -59,19 +59,14 @@ export default function GNaturezaForm({ > - - Natureza de Minutas - - + Natureza de Minutas + Natureza de MInutas {/* Formulário principal */}
- + {/* GRID MOBILE FIRST */}
{/* DESCRIÇÃO */} @@ -154,7 +149,7 @@ export default function GNaturezaForm({
{/* Rodapé */} - + + + - return ( - - - - - - - - - - - - - {isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'} - - - {gTBBairro.map((item) => ( - handleSelect(item.tb_bairro_id)} - > - - {GetCapitalize(item.descricao ?? '')} - - ))} - - - - - - ); + + + + + + {isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'} + + + {gTBBairro.map((item) => ( + handleSelect(item.tb_bairro_id)} + > + + {GetCapitalize(item.descricao ?? '')} + + ))} + + + + + + ); } diff --git a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx index a7bbdbf..215bcf6 100644 --- a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx @@ -1,129 +1,122 @@ -import { ColumnDef } from "@tanstack/react-table"; -import TAtoParteTipoInterface from "../../interfaces/TAtoParteTipo/TAtoParteTipoInterface"; -import { Button } from "@/components/ui/button"; +import { ColumnDef } from '@tanstack/react-table'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import { Button } from '@/components/ui/button'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; 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 GetCapitalize from "@/shared/actions/text/GetCapitalize"; -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; -import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; -import { TipoDaParteEnum } from "@/shared/enums/TIpoDaParteEnum"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; +import { TipoDaParteEnum } from '@/shared/enums/TIpoDaParteEnum'; export default function TAtoParteTipoColumns( - onEdit: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void, - onDelete: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void + onEdit: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void, ): ColumnDef[] { - return [ - // ID - { - accessorKey: "ato_partetipo_id", - header: ({ column }) => SortableHeader("#", column), - cell: ({ row }) => Number(row.getValue("ato_partetipo_id")), - enableSorting: false, - }, + return [ + // ID + { + accessorKey: 'ato_partetipo_id', + header: ({ column }) => SortableHeader('#', column), + cell: ({ row }) => Number(row.getValue('ato_partetipo_id')), + enableSorting: false, + }, - // Descrição - { - accessorKey: "descricao", - header: ({ column }) => SortableHeader("Descrição", column), - cell: ({ row }) => GetCapitalize(row.getValue("descricao")), - }, + // Descrição + { + accessorKey: 'descricao', + header: ({ column }) => SortableHeader('Descrição', column), + cell: ({ row }) => GetCapitalize(row.getValue('descricao')), + }, - // Tipo de Parte - { - accessorKey: "tipo_parte", - header: ({ column }) => SortableHeader("Tipo Parte", column), - cell: ({ row }) => { - const value = row.getValue("tipo_parte") as keyof typeof TipoDaParteEnum; - return TipoDaParteEnum[value] ?? "-"; - }, - }, + // Tipo de Parte + { + accessorKey: 'tipo_parte', + header: ({ column }) => SortableHeader('Tipo Parte', column), + cell: ({ row }) => { + const value = row.getValue('tipo_parte') as keyof typeof TipoDaParteEnum; + return TipoDaParteEnum[value] ?? '-'; + }, + }, - // Auto Qualifica - { - accessorKey: "auto_qualifica", - header: ({ column }) => SortableHeader("Auto Qualifica", column), - cell: ({ row }) => { - const value = row.getValue("auto_qualifica") as keyof typeof ConfirmacaoEnum; - return ConfirmacaoEnum[value] ?? "-"; - }, - }, + // Auto Qualifica + { + accessorKey: 'auto_qualifica', + header: ({ column }) => SortableHeader('Auto Qualifica', column), + cell: ({ row }) => { + const value = row.getValue('auto_qualifica') as keyof typeof ConfirmacaoEnum; + return ConfirmacaoEnum[value] ?? '-'; + }, + }, - // Declara DOI - { - accessorKey: "declara_doi", - header: ({ column }) => SortableHeader("Declara DOI", column), - cell: ({ row }) => { - const value = row.getValue("declara_doi") as keyof typeof ConfirmacaoEnum; - return ConfirmacaoEnum[value] ?? "-"; - }, - }, + // Declara DOI + { + accessorKey: 'declara_doi', + header: ({ column }) => SortableHeader('Declara DOI', column), + cell: ({ row }) => { + const value = row.getValue('declara_doi') as keyof typeof ConfirmacaoEnum; + return ConfirmacaoEnum[value] ?? '-'; + }, + }, - // Possui Documento Externo - { - accessorKey: "possui_documento_ext", - header: ({ column }) => SortableHeader("Doc. Externo", column), - cell: ({ row }) => { - const value = row.getValue("possui_documento_ext") as keyof typeof ConfirmacaoEnum; - return ConfirmacaoEnum[value] ?? "-"; - }, - }, + // Possui Documento Externo + { + accessorKey: 'possui_documento_ext', + header: ({ column }) => SortableHeader('Doc. Externo', column), + cell: ({ row }) => { + const value = row.getValue('possui_documento_ext') as keyof typeof ConfirmacaoEnum; + return ConfirmacaoEnum[value] ?? '-'; + }, + }, - // Situação - { - accessorKey: "situacao", - header: ({ column }) => SortableHeader("Situação", column), - cell: ({ row }) => { - const value = row.getValue("situacao") as keyof typeof SituacoesEnum; - return SituacoesEnum[value] ?? "-"; - }, - }, + // Situação + { + accessorKey: 'situacao', + header: ({ column }) => SortableHeader('Situação', column), + cell: ({ row }) => { + const value = row.getValue('situacao') as keyof typeof SituacoesEnum; + return SituacoesEnum[value] ?? '-'; + }, + }, - // 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, - }, - ]; + // 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/components/TAtoParteTipo/TAtoParteTipoForm.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx index 1bb2f19..87d8241 100644 --- a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx @@ -31,17 +31,20 @@ import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; import TCensecQualidadeSelect from '../TCensecQualidade/TCensecQualidadeSelect'; import TipoDaParteSelect from '@/shared/components/tipoDaParte/TipoDaParteSelect'; -export default function TAtoParteTipoForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TAtoParteTipoFormInterface) { - +export default function TAtoParteTipoForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: TAtoParteTipoFormInterface) { // Inicializa o react-hook-form com schema zod const form = useTAtoParteTipoFormHook({}); // Atualiza o formulário quando recebe dados para edição useEffect(() => { - // Se existir dados, reseta o formulário com os mesmos ResetFormIfData(form, data); - }, [data, form]); function onError(error: any) { @@ -57,12 +60,8 @@ export default function TAtoParteTipoForm({ isOpen, data, onClose, onSave, butto > - - Tipo de Partes do Ato - - - Tipo de Partes do Ato - + Tipo de Partes do Ato + Tipo de Partes do Ato @@ -76,7 +75,7 @@ export default function TAtoParteTipoForm({ isOpen, data, onClose, onSave, butto Descrição - + @@ -91,7 +90,7 @@ export default function TAtoParteTipoForm({ isOpen, data, onClose, onSave, butto render={({ field }) => ( Tipo da Parte - < TipoDaParteSelect field={field} /> + )} @@ -105,7 +104,7 @@ export default function TAtoParteTipoForm({ isOpen, data, onClose, onSave, butto render={({ field }) => ( Censec Qualidade - < TCensecQualidadeSelect field={field} /> + )} @@ -197,7 +196,7 @@ export default function TAtoParteTipoForm({ isOpen, data, onClose, onSave, butto {/* Rodapé do Dialog */} - + - - - - onEdit(imovel, true)}> - - Editar - - - onDelete(imovel, true)} - > - - Remover - - - - - ); - }, - enableSorting: false, - enableHiding: false, - }, - ]; + // 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/components/TCensecQualidade/TCensecQualidadeForm.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx index bb03cb4..60e0ca7 100644 --- a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx @@ -29,17 +29,20 @@ import { TCensecQualidadeFormInterface } from '../../interfaces/TCensecQualidade import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; import ConfirmacaoSelect from '@/shared/components/confirmacao/ConfirmacaoSelect'; -export default function TCensecQualidadeForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TCensecQualidadeFormInterface) { - +export default function TCensecQualidadeForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: TCensecQualidadeFormInterface) { // Inicializa o react-hook-form com schema zod const form = useTCensecQualidadeFormHook({}); // Atualiza o formulário quando recebe dados para edição useEffect(() => { - // Se existir dados, reseta o formulário com os mesmos ResetFormIfData(form, data); - }, [data, form]); function onError(error: any) { @@ -55,12 +58,8 @@ export default function TCensecQualidadeForm({ isOpen, data, onClose, onSave, bu > - - Tipo de Partes do Ato - - - Tipo de Partes do Ato - + Tipo de Partes do Ato + Tipo de Partes do Ato
@@ -74,7 +73,7 @@ export default function TCensecQualidadeForm({ isOpen, data, onClose, onSave, bu Descrição - + @@ -111,7 +110,7 @@ export default function TCensecQualidadeForm({ isOpen, data, onClose, onSave, bu {/* Rodapé do Dialog */} - + -
- - - - - - - {isLoading ? "Carregando..." : "Nenhum resultado encontrado."} - - - {tCensecQualidade?.map((item) => ( - { - field.onChange(Number(item.censec_qualidade_id)); - setOpen(false); - }} - > - - {GetCapitalize(item.descricao)} - - ))} - - - - - - ); + const [open, setOpen] = React.useState(false); + const [isLoading, setIsLoading] = React.useState(false); + const { tCensecQualidade, indexTCensecQualidade } = useTCensecQualidadeIndexHook(); + // Busca os dados uma única vez ao montar + React.useEffect(() => { + const loadData = async () => { + if (!tCensecQualidade.length) { + setIsLoading(true); + await indexTCensecQualidade(); + setIsLoading(false); + } + }; + loadData(); + }, []); + const selected = tCensecQualidade.find( + (item) => String(item.censec_qualidade_id) === String(field.value), + ); + return ( + + + + + + + + + + + + {isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'} + + + {tCensecQualidade?.map((item) => ( + { + field.onChange(Number(item.censec_qualidade_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + ); } diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx index 3f9a84a..21b6475 100644 --- a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx @@ -7,7 +7,11 @@ import TCensecQualidadeTableInterface from '../../interfaces/TCensecQualidade/TC /** * Componente principal da tabela */ -export default function TCensecQualidadeTable({ data, onEdit, onDelete }: TCensecQualidadeTableInterface) { +export default function TCensecQualidadeTable({ + data, + onEdit, + onDelete, +}: TCensecQualidadeTableInterface) { const columns = TCensecQualidadeColumns(onEdit, onDelete); return (
@@ -19,4 +23,4 @@ export default function TCensecQualidadeTable({ data, onEdit, onDelete }: TCense />
); -} \ No newline at end of file +} diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx index db02c75..fa27fad 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx @@ -1,10 +1,16 @@ -import { ColumnDef } from "@tanstack/react-table"; -import { Button } from "@/components/ui/button"; -import { ArrowUpDownIcon, EllipsisIcon, Trash2Icon } from "lucide-react"; -import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; -import GetCapitalize from "@/shared/actions/text/GetCapitalize"; -import { SortableHeader } from "@/shared/components/dataTable/SortableHeader"; -import TCensecQualidadeAtoJoinedInterface from "../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface"; +import { ColumnDef } from '@tanstack/react-table'; +import { Button } from '@/components/ui/button'; +import { ArrowUpDownIcon, EllipsisIcon, Trash2Icon } from 'lucide-react'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; +import TCensecQualidadeAtoJoinedInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface'; export default function TCensecQualidadeAtoColumns( onDelete: (item: TCensecQualidadeAtoJoinedInterface, isEditingFormStatus: boolean) => void, @@ -26,9 +32,9 @@ export default function TCensecQualidadeAtoColumns( }, // Descrição { - accessorKey: "tcq_descricao", - header: ({ column }) => SortableHeader("Descrição", column), - cell: ({ row }) => GetCapitalize(row.getValue("tcq_descricao")), + accessorKey: 'tcq_descricao', + header: ({ column }) => SortableHeader('Descrição', column), + cell: ({ row }) => GetCapitalize(row.getValue('tcq_descricao')), }, // Ações { @@ -61,4 +67,4 @@ export default function TCensecQualidadeAtoColumns( enableHiding: false, }, ]; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx index 2036941..93d89aa 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx @@ -30,10 +30,10 @@ export default function TCensecQualidadeAtoForm({ onSave, buttonIsLoading, }: TCensecQualidadeAtoFormInterface) { - const { tCensecQualidade, indexTCensecQualidade } = useTCensecQualidadeIndexHook(); - const [selectedTCensecQualidadeAto, setSelectedTCensecQualidadeAto] = useState(null); + const [selectedTCensecQualidadeAto, setSelectedTCensecQualidadeAto] = + useState(null); // Inicializa o react-hook-form com schema zod const form = useTCensecQualidadeAtoFormHook(); @@ -68,14 +68,10 @@ export default function TCensecQualidadeAtoForm({ if (!open) onClose(null, false); }} > - + - - Qualidades - - - Qualidades vinculadas - + Qualidades + Qualidades vinculadas
diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx index 807b1fc..9aa373e 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx @@ -1,60 +1,62 @@ -import { ColumnDef } from "@tanstack/react-table"; -import { Checkbox } from "@/components/ui/checkbox"; -import { Button } from "@/components/ui/button"; -import { ArrowUpDownIcon } from "lucide-react"; -import TCensecQualidadeAtoInterface from "../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface"; -import TCensecQualidadeInterface from "../../interfaces/TCensecQualidade/TCensecQualidadeInterface"; -import GetCapitalize from "@/shared/actions/text/GetCapitalize"; +import { ColumnDef } from '@tanstack/react-table'; +import { Checkbox } from '@/components/ui/checkbox'; +import { Button } from '@/components/ui/button'; +import { ArrowUpDownIcon } from 'lucide-react'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; export default function TCensecQualidadeAtoFormColumns( - setSelectedTCensecQualidadeAto: React.Dispatch>, + setSelectedTCensecQualidadeAto: React.Dispatch< + React.SetStateAction + >, ): ColumnDef[] { - return [ - { - id: 'select', - header: '', - cell: ({ row, table }) => ( - { - // Limpa todas as seleções antes de selecionar uma nova - table.resetRowSelection(); - row.toggleSelected(!!value); - setSelectedTCensecQualidadeAto(value ? row.original : null); - }} - aria-label="Select row" - /> - ), - enableSorting: false, - enableHiding: false, - }, - // ID - { - accessorKey: 'censec_qualidade_id', - header: ({ column }) => ( - - ), - cell: ({ row }) => Number(row.getValue('censec_qualidade_id')), - enableSorting: true, - }, - // ID - { - accessorKey: 'descricao', - header: ({ column }) => ( - - ), - cell: ({ row }) => GetCapitalize(row.getValue('descricao')), - enableSorting: true, - }, - ]; -} \ No newline at end of file + return [ + { + id: 'select', + header: '', + cell: ({ row, table }) => ( + { + // Limpa todas as seleções antes de selecionar uma nova + table.resetRowSelection(); + row.toggleSelected(!!value); + setSelectedTCensecQualidadeAto(value ? row.original : null); + }} + aria-label="Select row" + /> + ), + enableSorting: false, + enableHiding: false, + }, + // ID + { + accessorKey: 'censec_qualidade_id', + header: ({ column }) => ( + + ), + cell: ({ row }) => Number(row.getValue('censec_qualidade_id')), + enableSorting: true, + }, + // ID + { + accessorKey: 'descricao', + header: ({ column }) => ( + + ), + cell: ({ row }) => GetCapitalize(row.getValue('descricao')), + enableSorting: true, + }, + ]; +} diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx index 72334aa..0eb65a5 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx @@ -15,11 +15,12 @@ import TCensecQualidadeAtoForm from './TCensecQualidadeAtoForm'; import TCensecQualidadeAtoPageInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface'; import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; -export default function TCensecQualidadeAtoIndex({ censec_tipoato_id }: TCensecQualidadeAtoPageInterface) { - +export default function TCensecQualidadeAtoIndex({ + censec_tipoato_id, +}: TCensecQualidadeAtoPageInterface) { const TCensecQualidadeAtoPage: TCensecQualidadeAtoPageInterface = { - censec_tipoato_id: censec_tipoato_id - } + censec_tipoato_id: censec_tipoato_id, + }; // Controle de estado do botão const [buttonIsLoading, setButtonIsLoading] = useState(false); @@ -39,18 +40,15 @@ export default function TCensecQualidadeAtoIndex({ censec_tipoato_id }: TCensecQ /** * Hook do modal de confirmação */ - const { - isOpen: isConfirmOpen, - openDialog: openConfirmDialog, - handleCancel, - } = useConfirmDialog(); + const { isOpen: isConfirmOpen, openDialog: openConfirmDialog, handleCancel } = useConfirmDialog(); /** * Abre o formulário no modo de edição ou criação */ const handleOpenForm = useCallback((data: TCensecQualidadeAtoInterface | null) => { // Se não houver dados (criação), cria um objeto inicial com imovel_id - const initialData: TCensecQualidadeAtoPageInterface = data ?? { censec_tipoato_id } as TCensecQualidadeAtoPageInterface; + const initialData: TCensecQualidadeAtoPageInterface = + data ?? ({ censec_tipoato_id } as TCensecQualidadeAtoPageInterface); setSelectedData(initialData); setIsFormOpen(true); }, []); diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoTable.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoTable.tsx index 2da9cd7..4ce01cf 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoTable.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoTable.tsx @@ -15,16 +15,13 @@ export default function TCensecQualidadeAtoTable({ const columns = TCensecQualidadeAtoColumns(onDelete); const isEmpty = !data || data.length === 0; return ( -
+
{isEmpty ? ( -
+
Nenhuma unidade cadastrada ainda.
) : ( - + )}
); diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx index ab86e50..2eb3c94 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx @@ -1,257 +1,255 @@ 'use client'; -import z from "zod"; -import { useEffect } from "react"; -import { useForm, Controller } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import LoadingButton from "@/shared/components/loadingButton/LoadingButton"; -import { Button } from "@/components/ui/button"; +import z from 'zod'; +import { useEffect } from 'react'; +import { useForm, Controller } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { Button } from '@/components/ui/button'; import { - Dialog, - DialogClose, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle -} from "@/components/ui/dialog"; + 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 { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; -import { TCensecTipoAtoSchema } from "../../schemas/TCensecTipoAto/TCensecTipoAtoSchema"; -import TCensecInterface from "../../interfaces/TCensec/TCensecInterface"; -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; -import SituacoesSelect from "@/shared/components/situacoes/SituacoesSelect"; -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; -import { IdCardIcon, UserIcon } from "lucide-react"; -import TCensecQualidadeAtoIndex from "@/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex"; + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select'; +import { TCensecTipoAtoSchema } from '../../schemas/TCensecTipoAto/TCensecTipoAtoSchema'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { IdCardIcon, UserIcon } from 'lucide-react'; +import TCensecQualidadeAtoIndex from '@/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex'; type FormValues = z.infer; interface TCensecTipoAtoFormProps { - isOpen: boolean; - data: FormValues | null; - tCensec: TCensecInterface[]; - onClose: (item: null, isFormStatus: boolean) => void; - onSave: (data: FormValues) => void; - buttonIsLoading: boolean; + isOpen: boolean; + data: FormValues | null; + tCensec: TCensecInterface[]; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: FormValues) => void; + buttonIsLoading: boolean; } export default function TCensecTipoAtoForm({ - isOpen, - data, - tCensec, - onClose, - onSave, - buttonIsLoading + isOpen, + data, + tCensec, + onClose, + onSave, + buttonIsLoading, }: TCensecTipoAtoFormProps) { + const form = useForm({ + resolver: zodResolver(TCensecTipoAtoSchema), + defaultValues: { + censec_tipoato_id: 0, + censec_id: 0, + codigo: null, + descricao: '', + situacao: SituacoesEnum.A, + tipo_separacao: null, + tipo_revogacao: null, + }, + }); - const form = useForm({ - resolver: zodResolver(TCensecTipoAtoSchema), - defaultValues: { - censec_tipoato_id: 0, - censec_id: 0, - codigo: null, - descricao: "", - situacao: SituacoesEnum.A, - tipo_separacao: null, - tipo_revogacao: null, - }, - }); + useEffect(() => { + if (data) form.reset(data); + }, [data, form]); - useEffect(() => { - if (data) form.reset(data); - }, [data, form]); + return ( + { + if (!open) onClose(null, false); + }} + > + + + Tipo de Ato CENSEC + Crie ou edite um tipo de ato da CENSEC + - return ( - { - if (!open) onClose(null, false); - }} - > - - - Tipo de Ato CENSEC - - Crie ou edite um tipo de ato da CENSEC - - + {/* Conteúdo principal dentro das Tabs */} + + + + + Dados Gerais + + {data?.censec_tipoato_id && ( + + + Qualidades + + )} + - {/* Conteúdo principal dentro das Tabs */} - - - - - Dados Gerais - - {data?.censec_tipoato_id && ( - - - Qualidades - - )} - +
+ {/* ABA DADOS GERAIS */} + + + + {/* Descrição */} + ( + + Descrição + + + + + + )} + /> -
- {/* ABA DADOS GERAIS */} - - - + {/* Select Censec */} + ( + + Central do Censec + + + + )} + /> - {/* Descrição */} - ( - - Descrição - - - - - - )} - /> + {/* Situação */} + ( + + Situação + + + + + + )} + /> - {/* Select Censec */} - ( - - Central do Censec - - - - )} - /> + {/* Tipo de Separação */} + ( + + Tipo de Separação + + + + )} + /> - {/* Situação */} - ( - - Situação - - - - - - )} - /> + {/* Tipo de Revogação */} + ( + + Tipo de Revogação + + + + )} + /> - {/* Tipo de Separação */} - ( - - Tipo de Separação - - - - )} - /> + {/* Rodapé do formulário */} + + + + + + - {/* Tipo de Revogação */} - ( - - Tipo de Revogação - - - - )} - /> + {/* Campos ocultos */} + + + + + - {/* Rodapé do formulário */} - - - - - - - - {/* Campos ocultos */} - - - - - - - {/* ======== ABA QUALIDADES ======== */} - {data?.censec_tipoato_id && ( - - - - )} -
- - -
- ); + {/* ======== ABA QUALIDADES ======== */} + {data?.censec_tipoato_id && ( + + + + )} +
+ + + + ); } diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx index 3719dd7..abc98f5 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx @@ -1,30 +1,30 @@ 'use client'; -import { useEffect, useState, useCallback } from "react"; -import { Card, CardContent } from "@/components/ui/card"; -import { useConfirmDialog } from "@/shared/components/confirmDialog/useConfirmDialog"; +import { useEffect, useState, useCallback } from 'react'; +import { Card, CardContent } from '@/components/ui/card'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import Header from "@/shared/components/structure/Header"; -import ConfirmDialog from "@/shared/components/confirmDialog/ConfirmDialog"; -import Loading from "@/shared/components/loading/loading"; +import Header from '@/shared/components/structure/Header'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; -import TCensecTipoAtoTable from "./TCensecTipoAtoTable"; -import TCensecTipoAtoForm from "./TCensecTipoAtoForm"; +import TCensecTipoAtoTable from './TCensecTipoAtoTable'; +import TCensecTipoAtoForm from './TCensecTipoAtoForm'; -import { useTCensecTipoAtoReadHook } from "../../hooks/TCensecTipoAto/useTCensecTipoAtoReadHook"; -import { useTCensecTipoAtoSaveHook } from "../../hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook"; -import { useTCensecTipoAtoRemoveHook } from "../../hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook"; -import { useTCensecReadHook } from "../../hooks/TCensec/useTCensecReadHook"; +import { useTCensecTipoAtoReadHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoReadHook'; +import { useTCensecTipoAtoSaveHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook'; +import { useTCensecTipoAtoRemoveHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook'; +import { useTCensecReadHook } from '../../hooks/TCensec/useTCensecReadHook'; -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; // Estado inicial para criação const initialTCensecTipoAto: TCensecTipoAtoInterface = { censec_tipoato_id: 0, censec_id: 0, codigo: null, - descricao: "", + descricao: '', situacao: SituacoesEnum.A, tipo_separacao: null, tipo_revogacao: null, @@ -36,7 +36,7 @@ export default function TCensecTipoAtoIndex() { const { saveTCensecTipoAto } = useTCensecTipoAtoSaveHook(); const { removeTCensecTipoAto } = useTCensecTipoAtoRemoveHook(); - const { tCensec, fetchTCensec } = useTCensecReadHook() + const { tCensec, fetchTCensec } = useTCensecReadHook(); const [buttonIsLoading, setButtonIsLoading] = useState(false); @@ -71,7 +71,7 @@ export default function TCensecTipoAtoIndex() { await fetchTCensecTipoAto(); handleCloseForm(); }, - [saveTCensecTipoAto, fetchTCensecTipoAto] + [saveTCensecTipoAto, fetchTCensecTipoAto], ); // Deleção @@ -80,7 +80,7 @@ export default function TCensecTipoAtoIndex() { setItemToDelete(item); openConfirmDialog(); }, - [openConfirmDialog] + [openConfirmDialog], ); const handleDelete = useCallback(async () => { @@ -94,7 +94,7 @@ export default function TCensecTipoAtoIndex() { // Carregar dados ao montar useEffect(() => { fetchTCensecTipoAto(); - fetchTCensec() + fetchTCensec(); }, []); if (!tCensecTipoAto) { diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx index 3501d8e..18fdbc3 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx @@ -1,92 +1,92 @@ 'use client'; -import React from "react"; -import { Button } from "@/components/ui/button"; +import React from 'react'; +import { Button } from '@/components/ui/button'; import { - Command, - CommandEmpty, - CommandGroup, - CommandInput, - CommandItem, - CommandList, -} from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import GetCapitalize from "@/shared/actions/text/GetCapitalize"; -import { useTCensecTipoAtoReadHook } from "@/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook"; + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { useTCensecTipoAtoReadHook } from '@/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook'; export default function TCensecTipoAtoSelect({ field }: any) { - const [open, setOpen] = React.useState(false); - const [isLoading, setIsLoading] = React.useState(false); - const { tCensecTipoAto, fetchTCensecTipoAto } = useTCensecTipoAtoReadHook(); - // Busca os dados uma única vez ao montar - React.useEffect(() => { - const loadData = async () => { - if (!tCensecTipoAto.length) { - setIsLoading(true); - await fetchTCensecTipoAto(); - setIsLoading(false); - } - }; - loadData(); - }, []); - const selected = tCensecTipoAto.find( - (item) => String(item.censec_tipoato_id) === String(field.value) - ); - return ( - - - - - - - - - - - - {isLoading ? "Carregando..." : "Nenhum resultado encontrado."} - - - {tCensecTipoAto?.map((item) => ( - { - field.onChange(Number(item.censec_tipoato_id)); - setOpen(false); - }} - > - - {GetCapitalize(item.descricao)} - - ))} - - - - - - ); + const [open, setOpen] = React.useState(false); + const [isLoading, setIsLoading] = React.useState(false); + const { tCensecTipoAto, fetchTCensecTipoAto } = useTCensecTipoAtoReadHook(); + // Busca os dados uma única vez ao montar + React.useEffect(() => { + const loadData = async () => { + if (!tCensecTipoAto.length) { + setIsLoading(true); + await fetchTCensecTipoAto(); + setIsLoading(false); + } + }; + loadData(); + }, []); + const selected = tCensecTipoAto.find( + (item) => String(item.censec_tipoato_id) === String(field.value), + ); + return ( + + + + + + + + + + + + {isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'} + + + {tCensecTipoAto?.map((item) => ( + { + field.onChange(Number(item.censec_tipoato_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + ); } diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx index a615121..ff37b64 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx @@ -1,25 +1,25 @@ 'use client'; -import { Button } from "@/components/ui/button"; +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, - DropdownMenuTrigger -} from "@/components/ui/dropdown-menu"; + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; import { Table, TableBody, TableCell, TableHead, TableHeader, - TableRow -} from "@/components/ui/table"; -import { EllipsisIcon, PencilIcon, Trash2Icon } from "lucide-react"; -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; -import TCensecInterface from "../../interfaces/TCensec/TCensecInterface"; + TableRow, +} from '@/components/ui/table'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; interface TCensecTipoAtoTableProps { data: TCensecTipoAtoInterface[]; @@ -29,20 +29,17 @@ interface TCensecTipoAtoTableProps { } function StatusBadge({ situacao }: { situacao: string }) { - const isActive = situacao === "A"; + const isActive = situacao === 'A'; - const baseClasses = - "text-xs font-medium px-2.5 py-0.5 rounded-sm me-2"; + const baseClasses = 'text-xs font-medium px-2.5 py-0.5 rounded-sm me-2'; - const activeClasses = - "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300"; + const activeClasses = 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300'; - const inactiveClasses = - "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300"; + const inactiveClasses = 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300'; return ( - {isActive ? "Ativo" : "Inativo"} + {isActive ? 'Ativo' : 'Inativo'} ); } @@ -51,7 +48,7 @@ export default function TCensecTipoAtoTable({ data, tCensec, onEdit, - onDelete + onDelete, }: TCensecTipoAtoTableProps) { return ( @@ -70,28 +67,23 @@ export default function TCensecTipoAtoTable({ {data.map((item) => { - const censecDesc = tCensec.find(c => c.censec_id === item.censec_id)?.descricao || "N/A" + const censecDesc = + tCensec.find((c) => c.censec_id === item.censec_id)?.descricao || 'N/A'; return ( - - {item.censec_tipoato_id} - + {item.censec_tipoato_id} {censecDesc} {/*{item.codigo ?? "-"}*/} {item.descricao} - {item.tipo_separacao ?? "-"} - {item.tipo_revogacao ?? "-"} + {item.tipo_separacao ?? '-'} + {item.tipo_revogacao ?? '-'} - @@ -120,7 +112,7 @@ export default function TCensecTipoAtoTable({ - ) + ); })}
diff --git a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx index c01df6f..9cd652c 100644 --- a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx @@ -1,97 +1,90 @@ -import { ColumnDef } from "@tanstack/react-table"; -import TCensecTipoNaturezaInterface from "../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface"; -import { Button } from "@/components/ui/button"; +import { ColumnDef } from '@tanstack/react-table'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import { Button } from '@/components/ui/button'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; 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 GetCapitalize from "@/shared/actions/text/GetCapitalize"; -import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; -import { TipoAtoAnteriorEnum } from "@/shared/enums/TipoAtoAnteriorEnum"; + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; +import { TipoAtoAnteriorEnum } from '@/shared/enums/TipoAtoAnteriorEnum'; export default function TCensecTipoNaturezaColumns( - onEdit: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void, - onDelete: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void + onEdit: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void, + onDelete: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void, ): ColumnDef[] { - return [ - // ID - { - accessorKey: "censec_tiponatureza_id", - header: ({ column }) => SortableHeader("#", column), - cell: ({ row }) => Number(row.getValue("censec_tiponatureza_id")), - enableSorting: false, - }, - // descricao - { - accessorKey: "descricao", - header: ({ column }) => SortableHeader("Descrição", column), - cell: ({ row }) => GetCapitalize(row.getValue("descricao")), - }, - // possui_ato_anterior - { - accessorKey: "possui_ato_anterior", - header: ({ column }) => SortableHeader("Possui Ato Anterior", column), - cell: ({ row }) => { - const value = row.getValue("possui_ato_anterior") as keyof typeof ConfirmacaoEnum; - return ConfirmacaoEnum[value] ?? "-"; - }, - }, - // situacao_ato_anterior - { - accessorKey: "situacao_ato_anterior", - header: ({ column }) => SortableHeader("Situação Ato Anterior", column), - cell: ({ row }) => { - const value = Number(row.getValue("situacao_ato_anterior")); - const label = Object.prototype.hasOwnProperty.call(TipoAtoAnteriorEnum, value) - ? TipoAtoAnteriorEnum[value as keyof typeof TipoAtoAnteriorEnum] - : "-"; - return label; - }, - }, - // 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, - }, - ]; + return [ + // ID + { + accessorKey: 'censec_tiponatureza_id', + header: ({ column }) => SortableHeader('#', column), + cell: ({ row }) => Number(row.getValue('censec_tiponatureza_id')), + enableSorting: false, + }, + // descricao + { + accessorKey: 'descricao', + header: ({ column }) => SortableHeader('Descrição', column), + cell: ({ row }) => GetCapitalize(row.getValue('descricao')), + }, + // possui_ato_anterior + { + accessorKey: 'possui_ato_anterior', + header: ({ column }) => SortableHeader('Possui Ato Anterior', column), + cell: ({ row }) => { + const value = row.getValue('possui_ato_anterior') as keyof typeof ConfirmacaoEnum; + return ConfirmacaoEnum[value] ?? '-'; + }, + }, + // situacao_ato_anterior + { + accessorKey: 'situacao_ato_anterior', + header: ({ column }) => SortableHeader('Situação Ato Anterior', column), + cell: ({ row }) => { + const value = Number(row.getValue('situacao_ato_anterior')); + const label = Object.prototype.hasOwnProperty.call(TipoAtoAnteriorEnum, value) + ? TipoAtoAnteriorEnum[value as keyof typeof TipoAtoAnteriorEnum] + : '-'; + return label; + }, + }, + // 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/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx index cc746c6..649b3b3 100644 --- a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx @@ -32,17 +32,20 @@ import ConfirmacaoSelect from '@/shared/components/confirmacao/ConfirmacaoSelect import TipoAtoAnteriorSelect from '@/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect'; import TipoNaturezaSelect from '@/shared/components/tipoNatureza/TipoNaturezaSelect'; -export default function TCensecTipoNaturezaForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TCensecTipoNaturezaFormInterface) { - +export default function TCensecTipoNaturezaForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: TCensecTipoNaturezaFormInterface) { // Inicializa o react-hook-form com schema zod const form = useTCensecTipoNaturezaFormHook({}); // Atualiza o formulário quando recebe dados para edição useEffect(() => { - // Se existir dados, reseta o formulário com os mesmos ResetFormIfData(form, data); - }, [data, form]); function onError(error: any) { @@ -58,12 +61,8 @@ export default function TCensecTipoNaturezaForm({ isOpen, data, onClose, onSave, > - - Censec tipos de natureza - - - Censec tipos de natureza - + Censec tipos de natureza + Censec tipos de natureza
@@ -77,7 +76,7 @@ export default function TCensecTipoNaturezaForm({ isOpen, data, onClose, onSave, Descrição - + @@ -93,7 +92,7 @@ export default function TCensecTipoNaturezaForm({ isOpen, data, onClose, onSave, render={({ field }) => ( Tipo do Ato - < TCensecTipoAtoSelect field={field} /> + )} @@ -169,7 +168,11 @@ export default function TCensecTipoNaturezaForm({ isOpen, data, onClose, onSave, Código - field.onChange(parseNumberInput(e))} /> + field.onChange(parseNumberInput(e))} + /> @@ -178,7 +181,7 @@ export default function TCensecTipoNaturezaForm({ isOpen, data, onClose, onSave,
{/* Rodapé do Dialog */} - + - - - - onEdit(imovel, true)}> - - Editar - - - onDelete(imovel, true)} - > - - Remover - - - - - ); - }, - enableSorting: false, - enableHiding: false, - }, - ]; + // 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/components/TImovel/TImovelForm.tsx b/src/packages/administrativo/components/TImovel/TImovelForm.tsx index 9cf1f8b..7564d71 100644 --- a/src/packages/administrativo/components/TImovel/TImovelForm.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelForm.tsx @@ -34,17 +34,21 @@ import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; import TImovelTipoRegistroSelect from './TImovelTipoRegistroSelect'; import GTBBairroSelect from '../GTBBairro/GTBBairroSelect'; -export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoading, tipoClasse }: TImovelFormInterface) { - +export default function TImovelForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, + tipoClasse, +}: TImovelFormInterface) { // 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); - }, [data, form]); function onError(error: any) { @@ -60,9 +64,7 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa > - - {tipoClasse === 1 ? 'Imóvel Urbano' : 'Imóvel Rural'} - + {tipoClasse === 1 ? 'Imóvel Urbano' : 'Imóvel Rural'} {tipoClasse === 1 ? 'Cadastro de imóvel urbano' : 'Cadastro de imóvel rural'} @@ -70,12 +72,12 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa {/* Tabs */} - + Dados do Imóvel {data?.imovel_id && ( - + Unidades @@ -95,7 +97,7 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa UF - + @@ -111,7 +113,7 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa CEP - + @@ -159,7 +161,12 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa Cartório - field.onChange(parseNumberInput(e))} /> + field.onChange(parseNumberInput(e))} + /> @@ -175,7 +182,12 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa CNS - field.onChange(parseNumberInput(e))} /> + field.onChange(parseNumberInput(e))} + /> @@ -191,7 +203,7 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa Livro - + @@ -221,7 +233,12 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa Número - field.onChange(parseNumberInput(e))} /> + field.onChange(parseNumberInput(e))} + /> @@ -237,7 +254,7 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa Número Letra - + @@ -246,7 +263,7 @@ export default function TImovelForm({ isOpen, data, onClose, onSave, buttonIsLoa {/* Rodapé do Dialog */} - + - - - - - - - Nenhum resultado encontrado. - - {options.map((item) => ( - { - field.onChange(item.value); - setOpen(false); - }} - > - - {item.label} - - ))} - - - - - - ); + const [open, setOpen] = React.useState(false); + const options = Object.entries(ImovelConstrucaoEnum).map(([id, label]) => ({ + value: Number(id), + label, + })); + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); } diff --git a/src/packages/administrativo/components/TImovel/TImovelTipoImovelSelect.tsx b/src/packages/administrativo/components/TImovel/TImovelTipoImovelSelect.tsx index 0ab104c..ed5a113 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTipoImovelSelect.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTipoImovelSelect.tsx @@ -1,60 +1,71 @@ -import { Button } from "@/components/ui/button"; -import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { ImovelTipoEnum } from "@/shared/enums/ImovelTipoEnum"; -import { Command } from "cmdk"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import React from "react"; +import { Button } from '@/components/ui/button'; +import { + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { ImovelTipoEnum } from '@/shared/enums/ImovelTipoEnum'; +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; export default function TImovelTipoImovelSelect({ field }: any) { - const [open, setOpen] = React.useState(false); - const options = Object.entries(ImovelTipoEnum).map(([id, label]) => ({ - value: Number(id), - label, - })); + const [open, setOpen] = React.useState(false); + const options = Object.entries(ImovelTipoEnum).map(([id, label]) => ({ + value: Number(id), + label, + })); - return ( - - - - - - - - - - - Nenhum resultado encontrado. - - {options.map((item) => ( - { - field.onChange(item.value); - setOpen(false); - }} - > - - {item.label} - - ))} - - - - - - ); + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); } diff --git a/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx b/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx index 86e6fc5..8243c50 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx @@ -1,92 +1,92 @@ 'use client'; -import React from "react"; -import { Button } from "@/components/ui/button"; +import React from 'react'; +import { Button } from '@/components/ui/button'; import { - Command, - CommandEmpty, - CommandGroup, - CommandInput, - CommandItem, - CommandList, -} from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import GetCapitalize from "@/shared/actions/text/GetCapitalize"; -import { useGTBTipoLogradouroReadHook } from "@/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook"; + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { useGTBTipoLogradouroReadHook } from '@/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook'; export default function TImovelTipoLogradouroSelect({ field }: any) { - const [open, setOpen] = React.useState(false); - const [isLoading, setIsLoading] = React.useState(false); - const { gTBTipoLogradouro, fetchGTBTipoLogradouro } = useGTBTipoLogradouroReadHook(); - // Busca os dados uma única vez ao montar - React.useEffect(() => { - const loadData = async () => { - if (!gTBTipoLogradouro.length) { - setIsLoading(true); - await fetchGTBTipoLogradouro(); - setIsLoading(false); - } - }; - loadData(); - }, []); - const selected = gTBTipoLogradouro.find( - (item) => String(item.tb_tipologradouro_id) === String(field.value) - ); - return ( - - - - - - - - - - - - {isLoading ? "Carregando..." : "Nenhum resultado encontrado."} - - - {gTBTipoLogradouro?.map((item) => ( - { - field.onChange(Number(item.tb_tipologradouro_id)); - setOpen(false); - }} - > - - {GetCapitalize(item.descricao)} - - ))} - - - - - - ); + const [open, setOpen] = React.useState(false); + const [isLoading, setIsLoading] = React.useState(false); + const { gTBTipoLogradouro, fetchGTBTipoLogradouro } = useGTBTipoLogradouroReadHook(); + // Busca os dados uma única vez ao montar + React.useEffect(() => { + const loadData = async () => { + if (!gTBTipoLogradouro.length) { + setIsLoading(true); + await fetchGTBTipoLogradouro(); + setIsLoading(false); + } + }; + loadData(); + }, []); + const selected = gTBTipoLogradouro.find( + (item) => String(item.tb_tipologradouro_id) === String(field.value), + ); + return ( + + + + + + + + + + + + {isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'} + + + {gTBTipoLogradouro?.map((item) => ( + { + field.onChange(Number(item.tb_tipologradouro_id)); + setOpen(false); + }} + > + + {GetCapitalize(item.descricao)} + + ))} + + + + + + ); } diff --git a/src/packages/administrativo/components/TImovel/TImovelTipoRegistroSelect.tsx b/src/packages/administrativo/components/TImovel/TImovelTipoRegistroSelect.tsx index 8099d90..b432316 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTipoRegistroSelect.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTipoRegistroSelect.tsx @@ -1,67 +1,73 @@ -import { Button } from "@/components/ui/button"; -import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { ImovelTipoRegistro } from "@/shared/enums/ImovelTipoRegistro"; -import { Command } from "cmdk"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import React from "react"; +import { Button } from '@/components/ui/button'; +import { + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { ImovelTipoRegistro } from '@/shared/enums/ImovelTipoRegistro'; +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; export default function TImovelTipoRegistroSelect({ field }: any) { - const [open, setOpen] = React.useState(false); + const [open, setOpen] = React.useState(false); - const options = Object.entries(ImovelTipoRegistro).map(([id, label]) => ({ - value: id, - label, - })); + const options = Object.entries(ImovelTipoRegistro).map(([id, label]) => ({ + value: id, + label, + })); - const selected = options.find((item) => item.value === field?.value); + const selected = options.find((item) => item.value === field?.value); - return ( - - - - - - + return ( + + + + + + - - - - - Nenhum resultado encontrado. - - {options.map((item) => ( - { - field.onChange(item.value); - setOpen(false); - }} - > - - {item.label} - - ))} - - - - - - ); + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); } diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx index d996423..fc63d06 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx @@ -1,90 +1,83 @@ -import { ColumnDef } from "@tanstack/react-table"; -import { Button } from "@/components/ui/button"; +import { ColumnDef } from '@tanstack/react-table'; +import { Button } from '@/components/ui/button'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; 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"; + 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 + 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, - }, - ]; + 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/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx index 9fc17a4..126ed79 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx @@ -26,22 +26,31 @@ import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; import { TImovelUnidadeRuralFormInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface'; import { useTImovelUnidadeRuralFormHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook'; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import TImovelTipoImovelSelect from '../../TImovel/TImovelTipoImovelSelect'; import TImovelTipoConstrucaoSelect from '../../TImovel/TImovelTipoConstrucaoSelect'; -export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TImovelUnidadeRuralFormInterface) { - +export default function TImovelUnidadeRuralForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: TImovelUnidadeRuralFormInterface) { // 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); - }, [data]); function onErro(errors: any) { @@ -55,18 +64,14 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, if (!open) onClose(null, false); }} > - + - - Unidades do Imóvel - - - Cadastro de unidades do imóvel - + Unidades do Imóvel + Cadastro de unidades do imóvel
-
+
{/* Tipo Imóvel */}
( - - Nome Identificação - + Nome Identificação @@ -124,9 +127,7 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, name="denominacao" render={({ field }) => ( - - Denominação - + Denominação @@ -142,9 +143,7 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, name="area_descritiva" render={({ field }) => ( - - Área Descritiva - + Área Descritiva @@ -160,9 +159,7 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, name="ccir" render={({ field }) => ( - - CCIR (Incra) - + CCIR (Incra) @@ -178,9 +175,7 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, name="nirf" render={({ field }) => ( - - NIRF - + NIRF @@ -195,14 +190,11 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, control={form.control} name="geo_referenciamento" render={({ field }) => ( - + Geo Referenciamento - + @@ -222,14 +214,11 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave, control={form.control} name="reserva_florestal" render={({ field }) => ( - + Reserva Florestal - + @@ -245,7 +234,7 @@ export default function TImovelUnidadeRuralForm({ isOpen, data, onClose, onSave,
{/* Rodapé do Dialog */} - + - - - - onEdit(imovel, true)}> - - Editar - - - onDelete(imovel, true)} - > - - Remover - - - - - ); - }, - enableSorting: false, - enableHiding: false, - }, - ]; + 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/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx index 0dee537..a8573cd 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx @@ -31,8 +31,13 @@ import TImovelTipoImovelSelect from '../../TImovel/TImovelTipoImovelSelect'; import TImovelTipoConstrucaoSelect from '../../TImovel/TImovelTipoConstrucaoSelect'; import TImovelTipoLogradouroSelect from '../../TImovel/TImovelTipoLogradouroSelect'; -export default function TImovelUnidadeUrbanoForm({ isOpen, data, onClose, onSave, buttonIsLoading }: TImovelUnidadeUrbanoFormInterface) { - +export default function TImovelUnidadeUrbanoForm({ + isOpen, + data, + onClose, + onSave, + buttonIsLoading, +}: TImovelUnidadeUrbanoFormInterface) { // Inicializa o react-hook-form com schema zod const form = useTImovelUnidadeUrbanoFormHook({}); @@ -48,18 +53,14 @@ export default function TImovelUnidadeUrbanoForm({ isOpen, data, onClose, onSave if (!open) onClose(null, false); }} > - + - - Unidades Urbanas do Imóvel - - - Cadastro de unidades do imóvel - + Unidades Urbanas do Imóvel + Cadastro de unidades do imóvel -
+
{/* Quadra */}
Quadra - + @@ -101,9 +102,10 @@ export default function TImovelUnidadeUrbanoForm({ isOpen, data, onClose, onSave Área(m2) - field.onChange(parseNumberInput(e))} + field.onChange(parseNumberInput(e))} /> @@ -246,9 +248,7 @@ export default function TImovelUnidadeUrbanoForm({ isOpen, data, onClose, onSave Condominio - + @@ -353,7 +353,7 @@ export default function TImovelUnidadeUrbanoForm({ isOpen, data, onClose, onSave
{/* Rodapé do Dialog */} - + @@ -365,10 +355,10 @@ export default function TPessoaFisicaForm({ > {field.value ? gTBRegimeComunhao?.find( - (item) => - String(item.tb_regimecomunhao_id) === - String(field.value), - )?.descricao + (item) => + String(item.tb_regimecomunhao_id) === + String(field.value), + )?.descricao : 'Escolha o regime'} @@ -433,9 +423,9 @@ export default function TPessoaFisicaForm({ > {field.value ? gTBProfissao?.find( - (item) => - String(item.tb_profissao_id) === String(field.value), - )?.descricao + (item) => + String(item.tb_profissao_id) === String(field.value), + )?.descricao : 'Escolha a profissão'} diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx index 1f0d577..95c4871 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx @@ -47,7 +47,8 @@ export default function TPessoaFisicaIndex() { */ const handleOpenForm = useCallback((data: TPessoaFisicaInterface | null) => { // Se não houver dados (criação), cria um objeto inicial com pessoa_tipo - const initialData: TPessoaFisicaInterface = data ?? { pessoa_tipo: "F" } as TPessoaFisicaInterface; + const initialData: TPessoaFisicaInterface = + data ?? ({ pessoa_tipo: 'F' } as TPessoaFisicaInterface); setSelectedAndamento(initialData); setIsFormOpen(true); }, []); @@ -140,9 +141,7 @@ export default function TPessoaFisicaIndex() { }} /> {/* Tabela de Registros */} - + {/* Modal de confirmação */} diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx index 1e2ecbd..e6dca9a 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx @@ -1,151 +1,158 @@ -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"; +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, + 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, - }, + 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 || '-'}
+
+
+ ); + }, + 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)} > - Nome / Email - - ), - cell: ({ row }) => { - const pessoa = row.original; - return ( -
- {/* Nome e Email */} -
-
{pessoa.nome || '-'}
-
-
- ); - }, - 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, - }, - ]; + + Remover +
+
+
+
+ ); + }, + enableSorting: false, + enableHiding: false, + }, + ]; } diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx index 2a2fe7c..5d9e1dc 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx @@ -38,7 +38,6 @@ export default function TPessoaJuridicaForm({ onSave, buttonIsLoading, }: TPessoaJuridicaFormInterface) { - // Inicializa o react-hook-form com schema zod const form = useTPessoaJuridicaFormHook({}); @@ -114,9 +113,7 @@ export default function TPessoaJuridicaForm({ name="nome_fantasia" render={({ field }) => ( - - Nome Fantasia - + Nome Fantasia País - field.onChange(parseNumberInput(e))} - className="w-full" /> + field.onChange(parseNumberInput(e))} + className="w-full" + /> @@ -364,6 +363,6 @@ export default function TPessoaJuridicaForm({ - + ); } diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx index 5eaa7b2..a8e860e 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx @@ -18,156 +18,157 @@ import TPessoaJuridicaForm from '@/packages/administrativo/components/TPessoa/TP import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; export default function TPessoaJuridicaIndex() { + // Controle de estado do botão + const [buttonIsLoading, setButtonIsLoading] = useState(false); - // Controle de estado do botão - const [buttonIsLoading, setButtonIsLoading] = useState(false); + // Hooks para leitura e salvamento + const { tPessoaJuridica, fetchTPessoaJuridica } = useTPessoaJuridicaIndexHook(); + const { saveTPessoaJuridica } = useTPessoaJuridicaSaveHook(); + const { deleteTPessoaJuridica } = useTPessoaJuridicaDeleteHook(); - // Hooks para leitura e salvamento - const { tPessoaJuridica, fetchTPessoaJuridica } = useTPessoaJuridicaIndexHook(); - const { saveTPessoaJuridica } = useTPessoaJuridicaSaveHook(); - const { deleteTPessoaJuridica } = useTPessoaJuridicaDeleteHook(); + // Estados + const [selectedData, setSelectedData] = useState(null); + const [isFormOpen, setIsFormOpen] = useState(false); - // Estados - const [selectedData, setSelectedData] = useState(null); - const [isFormOpen, setIsFormOpen] = useState(false); + // Estado para saber qual item será deletado + const [itemToDelete, setItemToDelete] = useState(null); - // 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(); - /** - * 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: TPessoaInterface | null) => { + // Se não houver dados (criação), cria um objeto inicial com pessoa_tipo + const initialData: TPessoaJuridicaInterface = + data ?? ({ pessoa_tipo: 'J' } as TPessoaJuridicaInterface); + setSelectedData(initialData); + setIsFormOpen(true); + }, []); - /** - * Abre o formulário no modo de edição ou criação - */ - const handleOpenForm = useCallback((data: TPessoaInterface | null) => { - // Se não houver dados (criação), cria um objeto inicial com pessoa_tipo - const initialData: TPessoaJuridicaInterface = data ?? { pessoa_tipo: "J" } as TPessoaJuridicaInterface; - setSelectedData(initialData); - setIsFormOpen(true); - }, []); + /** + * Fecha o formulário e limpa o andamento selecionado + */ + const handleCloseForm = useCallback(() => { + setSelectedData(null); + setIsFormOpen(false); + }, []); - /** - * Fecha o formulário e limpa o andamento selecionado - */ - const handleCloseForm = useCallback(() => { - setSelectedData(null); - setIsFormOpen(false); - }, []); + /** + * Salva os dados do formulário + */ + const handleSave = useCallback( + async (formData: TPessoaInterface) => { + // Coloca o botão em estado de loading + setButtonIsLoading(true); - /** - * Salva os dados do formulário - */ - const handleSave = useCallback( - async (formData: TPessoaInterface) => { - // Coloca o botão em estado de loading - setButtonIsLoading(true); + // Aguarda salvar o registro + await saveTPessoaJuridica(formData); - // Aguarda salvar o registro - await saveTPessoaJuridica(formData); + // Remove o botão em estado de loading + setButtonIsLoading(false); - // Remove o botão em estado de loading - setButtonIsLoading(false); + // Atualiza a lista de dados + fetchTPessoaJuridica(); + }, + [saveTPessoaJuridica, fetchTPessoaJuridica, handleCloseForm], + ); - // Atualiza a lista de dados - fetchTPessoaJuridica(); - }, - [saveTPessoaJuridica, fetchTPessoaJuridica, handleCloseForm], - ); + /** + * Quando o usuário clica em "remover" na tabela + */ + const handleConfirmDelete = useCallback( + (item: TPessoaInterface) => { + // Define o item atual para remoção + setItemToDelete(item); + // Abre o modal de confirmação + openConfirmDialog(); + }, + [openConfirmDialog], + ); - /** - * Quando o usuário clica em "remover" na tabela - */ - const handleConfirmDelete = useCallback( - (item: TPessoaInterface) => { - // 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 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 deleteTPessoaJuridica(itemToDelete); - // Executa o Hook de remoção - await deleteTPessoaJuridica(itemToDelete); + // Atualiza a lista + await fetchTPessoaJuridica(); - // Atualiza a lista - await fetchTPessoaJuridica(); + // Limpa o item selecionado + setItemToDelete(null); - // Limpa o item selecionado - setItemToDelete(null); + // Fecha o modal + handleCancel(); + }, [itemToDelete, fetchTPessoaJuridica, handleCancel]); - // Fecha o modal - handleCancel(); - }, [itemToDelete, fetchTPessoaJuridica, handleCancel]); + /** + * Busca inicial dos dados + */ + useEffect(() => { + fetchTPessoaJuridica(); + }, []); - /** - * Busca inicial dos dados - */ - useEffect(() => { - fetchTPessoaJuridica(); - }, []); + /** + * Tela de loading enquanto carrega os dados + */ + if (tPessoaJuridica.length == 0) { + return ; + } - /** - * Tela de loading enquanto carrega os dados - */ - if (tPessoaJuridica.length == 0) { - return ; - } - - return ( -
- {/* Cabeçalho */} -
{ - handleOpenForm(null); - }} - /> - {/* Tabela de Registros */} - - {/* Modal de confirmação */} - {isConfirmOpen && ( - - )} - {/* Formulário de criação/edição */} - {isFormOpen && ( - - )} -
- ); + return ( +
+ {/* Cabeçalho */} +
{ + handleOpenForm(null); + }} + /> + {/* Tabela de Registros */} + + {/* Modal de confirmação */} + {isConfirmOpen && ( + + )} + {/* Formulário de criação/edição */} + {isFormOpen && ( + + )} +
+ ); } diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx index 6955c92..1e92d6d 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx @@ -1,11 +1,17 @@ -import { ColumnDef } from "@tanstack/react-table"; -import TPessoaRepresentanteInterface from "../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface"; -import { Button } from "@/components/ui/button"; -import { ArrowUpDownIcon, EllipsisIcon, Trash2Icon } from "lucide-react"; -import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; -import TPessoaRepresentanteJoinedInterface from "../../interfaces/TPessoaRepresentante/TPessoaRepresentanteJoinedInterface"; -import GetNameInitials from "@/shared/actions/text/GetNameInitials"; -import empty from "@/shared/actions/validations/empty"; +import { ColumnDef } from '@tanstack/react-table'; +import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; +import { Button } from '@/components/ui/button'; +import { ArrowUpDownIcon, EllipsisIcon, Trash2Icon } from 'lucide-react'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import TPessoaRepresentanteJoinedInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteJoinedInterface'; +import GetNameInitials from '@/shared/actions/text/GetNameInitials'; +import empty from '@/shared/actions/validations/empty'; export default function TPessoaRepresentanteColumns( onDelete: (item: TPessoaRepresentanteInterface, isEditingFormStatus: boolean) => void, @@ -58,7 +64,9 @@ export default function TPessoaRepresentanteColumns( ); }, sortingFn: (a, b) => - (a.original.tpf_nome?.toLowerCase() || '').localeCompare(b.original.tpf_nome?.toLowerCase() || ''), + (a.original.tpf_nome?.toLowerCase() || '').localeCompare( + b.original.tpf_nome?.toLowerCase() || '', + ), }, // Ações { @@ -91,4 +99,4 @@ export default function TPessoaRepresentanteColumns( enableHiding: false, }, ]; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx index 3da7780..dce1501 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx @@ -32,7 +32,8 @@ export default function TPessoaRepresentanteForm({ }: TPessoaRepresentanteFormInterface) { const { tPessoaFisica, fetchTPessoaFisica } = useTPessoaFisicaIndexHook(); - const [selectedTPessoaRepresentante, setSelectedTPessoaRepresentante] = useState(null); + const [selectedTPessoaRepresentante, setSelectedTPessoaRepresentante] = + useState(null); // Inicializa o react-hook-form com schema zod const form = useTPessoaRepresentanteFormHook(); @@ -63,7 +64,7 @@ export default function TPessoaRepresentanteForm({ if (!open) onClose(null, false); }} > - + Representante Busque o representante desejado diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx index 19d40eb..7488015 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx @@ -18,10 +18,9 @@ import TPessoaRepresentantePageInterface from '../../interfaces/TPessoaRepresent import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; export default function TPessoaRepresentantePage({ pessoa_id }: TPessoaRepresentantePageInterface) { - const TPessoaRepresentantePage: TPessoaRepresentantePageInterface = { - pessoa_id: pessoa_id - } + pessoa_id: pessoa_id, + }; // Controle de estado do botão const [buttonIsLoading, setButtonIsLoading] = useState(false); @@ -41,18 +40,15 @@ export default function TPessoaRepresentantePage({ pessoa_id }: TPessoaRepresent /** * Hook do modal de confirmação */ - const { - isOpen: isConfirmOpen, - openDialog: openConfirmDialog, - handleCancel, - } = useConfirmDialog(); + const { isOpen: isConfirmOpen, openDialog: openConfirmDialog, handleCancel } = useConfirmDialog(); /** * Abre o formulário no modo de edição ou criação */ const handleOpenForm = useCallback((data: TPessoaRepresentanteInterface | null) => { // Se não houver dados (criação), cria um objeto inicial com imovel_id - const initialData: TPessoaRepresentantePageInterface = data ?? { pessoa_id } as TPessoaRepresentantePageInterface; + const initialData: TPessoaRepresentantePageInterface = + data ?? ({ pessoa_id } as TPessoaRepresentantePageInterface); setSelectedData(initialData); setIsFormOpen(true); }, []); diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteTable.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteTable.tsx index b6a6d13..ec8e78f 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteTable.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteTable.tsx @@ -15,16 +15,13 @@ export default function TPessoaRepresentanteTable({ const columns = TPessoaRepresentanteColumns(onDelete); const isEmpty = !data || data.length === 0; return ( -
+
{isEmpty ? ( -
+
Nenhuma unidade cadastrada ainda.
) : ( - + )}
); diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoasRepresentanteFormColumns.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoasRepresentanteFormColumns.tsx index 5c83fe9..9eae79f 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoasRepresentanteFormColumns.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoasRepresentanteFormColumns.tsx @@ -1,121 +1,123 @@ -import { ColumnDef } from "@tanstack/react-table"; -import { Checkbox } from "@/components/ui/checkbox"; -import { Button } from "@/components/ui/button"; -import { ArrowUpDownIcon } from "lucide-react"; -import empty from "@/shared/actions/validations/empty"; -import { FormatCPF } from "@/shared/actions/CPF/FormatCPF"; -import { FormatPhone } from "@/shared/actions/phone/FormatPhone"; -import TPessoaFisicaInterface from "../../interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface"; -import GetNameInitials from "@/shared/actions/text/GetNameInitials"; -import TPessoaRepresentanteInterface from "../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface"; +import { ColumnDef } from '@tanstack/react-table'; +import { Checkbox } from '@/components/ui/checkbox'; +import { Button } from '@/components/ui/button'; +import { ArrowUpDownIcon } from 'lucide-react'; +import empty from '@/shared/actions/validations/empty'; +import { FormatCPF } from '@/shared/actions/CPF/FormatCPF'; +import { FormatPhone } from '@/shared/actions/phone/FormatPhone'; +import TPessoaFisicaInterface from '../../interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; +import GetNameInitials from '@/shared/actions/text/GetNameInitials'; +import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; /** * Função para criar a definição das colunas da tabela */ export default function TPessoasRepresentanteFormColumns( - setSelectedTPessoaRepresentante: React.Dispatch>, + setSelectedTPessoaRepresentante: React.Dispatch< + React.SetStateAction + >, ): ColumnDef[] { - return [ - { - id: 'select', - header: '', - cell: ({ row, table }) => ( - { - // Limpa todas as seleções antes de selecionar uma nova - table.resetRowSelection(); - row.toggleSelected(!!value); - setSelectedTPessoaRepresentante(value ? row.original : null); - }} - aria-label="Select row" + return [ + { + id: 'select', + header: '', + cell: ({ row, table }) => ( + { + // Limpa todas as seleções antes de selecionar uma nova + table.resetRowSelection(); + row.toggleSelected(!!value); + setSelectedTPessoaRepresentante(value ? row.original : null); + }} + aria-label="Select row" + /> + ), + enableSorting: false, + enableHiding: false, + }, + // 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 - ), - enableSorting: false, - enableHiding: false, - }, - // 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')), - }, - ]; -} \ No newline at end of file + ) : ( + + {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')), + }, + ]; +} diff --git a/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts b/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts index f44552c..9661f74 100644 --- a/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts +++ b/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts @@ -9,14 +9,13 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/ // Função assíncrona que implementa a lógica de salvar (criar/atualizar) uma cidade async function executeGcidadeIndexData() { - // Instancia o cliente da API para enviar a requisição const api = new API(); // Executa a requisição para a API com o método apropriado e envia os dados no corpo return await api.send({ method: Methods.GET, // GET listar todos os itens - endpoint: `administrativo/g_cidade/` // endpoint dinâmico + endpoint: `administrativo/g_cidade/`, // endpoint dinâmico }); } diff --git a/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts b/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts index 1801b13..513c160 100644 --- a/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts +++ b/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts @@ -12,7 +12,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/ // Função assíncrona que implementa a lógica de salvar (criar/atualizar) uma cidade async function executeGcidadeRemoveData(data: GCidadeInterface) { - // Instancia o cliente da API para enviar a requisição const api = new API(); diff --git a/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts b/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts index cd1aede..8b71f79 100644 --- a/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts +++ b/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts @@ -12,7 +12,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/ // Função assíncrona que implementa a lógica de salvar (criar/atualizar) uma cidade async function executeGcidadeSaveData(data: GCidadeInterface) { - // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) const isUpdate = Boolean(data.cidade_id); diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts index 5073de9..250f28c 100644 --- a/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts +++ b/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts @@ -1,18 +1,16 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; -async function executeGNaturezaDeleteData( - data: GNaturezaInterface -): Promise { - const api = new API(); +async function executeGNaturezaDeleteData(data: GNaturezaInterface): Promise { + const api = new API(); - return api.send({ - method: Methods.DELETE, - endpoint: `administrativo/g_natureza/${data.natureza_id}`, - }); + return api.send({ + method: Methods.DELETE, + endpoint: `administrativo/g_natureza/${data.natureza_id}`, + }); } -export const GNaturezaDeleteData = withClientErrorHandler(executeGNaturezaDeleteData); \ No newline at end of file +export const GNaturezaDeleteData = withClientErrorHandler(executeGNaturezaDeleteData); diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts index eff3aec..5c59464 100644 --- a/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts +++ b/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts @@ -1,18 +1,16 @@ -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; -async function executeGNaturezaIndexData( - data: GNaturezaInterface -): Promise { - const api = new API(); +async function executeGNaturezaIndexData(data: GNaturezaInterface): Promise { + const api = new API(); - return api.send({ - method: Methods.GET, - endpoint: `administrativo/g_natureza/sistema/${data.sistema_id}`, - }); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/g_natureza/sistema/${data.sistema_id}`, + }); } -export const GNaturezaIndexData = withClientErrorHandler(executeGNaturezaIndexData); \ No newline at end of file +export const GNaturezaIndexData = withClientErrorHandler(executeGNaturezaIndexData); diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts index bd8b452..f8a95b7 100644 --- a/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts +++ b/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts @@ -1,24 +1,22 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; -async function executeGNaturezaSaveData( - data: GNaturezaInterface -): Promise { - // Verifica se existe ID para decidir se é atualização (PUT) ou criação (POST) - const isUpdate = Boolean(data.natureza_id); +async function executeGNaturezaSaveData(data: GNaturezaInterface): Promise { + // Verifica se existe ID para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.natureza_id); - // Instancia o cliente da API - const api = new API(); + // Instancia o cliente da API + const api = new API(); - // Executa a requisição para a API com o método apropriado e envia os dados no corpo - return api.send({ - method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar - endpoint: `administrativo/g_natureza/${data.natureza_id || ""}`, // endpoint dinâmico - body: data, // payload enviado para a API - }); + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/g_natureza/${data.natureza_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); } export const GNaturezaSaveData = withClientErrorHandler(executeGNaturezaSaveData); diff --git a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts index b63016d..b87340b 100644 --- a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts +++ b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts @@ -1,18 +1,18 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import TAtoParteTipoInterface from "../../interfaces/TAtoParteTipo/TAtoParteTipoInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; -async function executeTAtoParteTipoDeleteData(data: TAtoParteTipoInterface): Promise { - - const api = new API(); - - return await api.send({ - method: Methods.DELETE, - endpoint: `administrativo/t_ato_partetipo/${data.ato_partetipo_id}` - }); +async function executeTAtoParteTipoDeleteData( + data: TAtoParteTipoInterface, +): Promise { + const api = new API(); + return await api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_ato_partetipo/${data.ato_partetipo_id}`, + }); } -export const TAtoParteTipoDeleteData = withClientErrorHandler(executeTAtoParteTipoDeleteData); \ No newline at end of file +export const TAtoParteTipoDeleteData = withClientErrorHandler(executeTAtoParteTipoDeleteData); diff --git a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteIndexData.ts b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteIndexData.ts index c6a3689..4cb5fef 100644 --- a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteIndexData.ts +++ b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteIndexData.ts @@ -1,14 +1,14 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; async function executeTAtoParteTipoIndexData(): Promise { - const api = new API(); - return api.send({ - method: Methods.GET, - endpoint: `administrativo/t_ato_partetipo` - }); + const api = new API(); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/t_ato_partetipo`, + }); } -export const TAtoParteTipoIndexData = withClientErrorHandler(executeTAtoParteTipoIndexData); \ No newline at end of file +export const TAtoParteTipoIndexData = withClientErrorHandler(executeTAtoParteTipoIndexData); diff --git a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts index 5159911..23be44a 100644 --- a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts +++ b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts @@ -1,24 +1,24 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import TAtoParteTipoInterface from "../../interfaces/TAtoParteTipo/TAtoParteTipoInterface"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -async function executeTAtoParteTipoSaveData(data: TAtoParteTipoInterface): Promise { +async function executeTAtoParteTipoSaveData( + data: TAtoParteTipoInterface, +): Promise { + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.ato_partetipo_id); - // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) - const isUpdate = Boolean(data.ato_partetipo_id); - - // Instancia o cliente da API para enviar a requisição - const api = new API(); - - // Executa a requisição para a API com o método apropriado e envia os dados no corpo - return await api.send({ - method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar - endpoint: `administrativo/t_ato_partetipo/${data.ato_partetipo_id || ''}`, // endpoint dinâmico - body: data, // payload enviado para a API - }); + // Instancia o cliente da API para enviar a requisição + const api = new API(); + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_ato_partetipo/${data.ato_partetipo_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); } -export const TAtoParteTipoSaveData = withClientErrorHandler(executeTAtoParteTipoSaveData); \ No newline at end of file +export const TAtoParteTipoSaveData = withClientErrorHandler(executeTAtoParteTipoSaveData); diff --git a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts index 9cf7b8c..072221e 100644 --- a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts +++ b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts @@ -1,18 +1,18 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import TCensecQualidadeInterface from "../../interfaces/TCensecQualidade/TCensecQualidadeInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; -async function executeTCensecQualidadeDeleteData(data: TCensecQualidadeInterface): Promise { - - const api = new API(); - - return await api.send({ - method: Methods.DELETE, - endpoint: `administrativo/t_censec_qualidade/${data.censec_qualidade_id}` - }); +async function executeTCensecQualidadeDeleteData( + data: TCensecQualidadeInterface, +): Promise { + const api = new API(); + return await api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_censec_qualidade/${data.censec_qualidade_id}`, + }); } -export const TCensecQualidadeDeleteData = withClientErrorHandler(executeTCensecQualidadeDeleteData); \ No newline at end of file +export const TCensecQualidadeDeleteData = withClientErrorHandler(executeTCensecQualidadeDeleteData); diff --git a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeIndexData.ts b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeIndexData.ts index 7210da9..9adf6f3 100644 --- a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeIndexData.ts +++ b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeIndexData.ts @@ -1,14 +1,14 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; async function executeTCensecQualidadeIndexData(): Promise { - const api = new API(); - return api.send({ - method: Methods.GET, - endpoint: `administrativo/t_censec_qualidade` - }); + const api = new API(); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/t_censec_qualidade`, + }); } -export const TCensecQualidadeIndexData = withClientErrorHandler(executeTCensecQualidadeIndexData); \ No newline at end of file +export const TCensecQualidadeIndexData = withClientErrorHandler(executeTCensecQualidadeIndexData); diff --git a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts index 36d5811..fe15c4d 100644 --- a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts +++ b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts @@ -1,24 +1,24 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import TCensecQualidadeInterface from "../../interfaces/TCensecQualidade/TCensecQualidadeInterface"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -async function executeTCensecQualidadeSaveData(data: TCensecQualidadeInterface): Promise { +async function executeTCensecQualidadeSaveData( + data: TCensecQualidadeInterface, +): Promise { + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.censec_qualidade_id); - // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) - const isUpdate = Boolean(data.censec_qualidade_id); - - // Instancia o cliente da API para enviar a requisição - const api = new API(); - - // Executa a requisição para a API com o método apropriado e envia os dados no corpo - return await api.send({ - method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar - endpoint: `administrativo/t_censec_qualidade/${data.censec_qualidade_id || ''}`, // endpoint dinâmico - body: data, // payload enviado para a API - }); + // Instancia o cliente da API para enviar a requisição + const api = new API(); + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_censec_qualidade/${data.censec_qualidade_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); } -export const TCensecQualidadeSaveData = withClientErrorHandler(executeTCensecQualidadeSaveData); \ No newline at end of file +export const TCensecQualidadeSaveData = withClientErrorHandler(executeTCensecQualidadeSaveData); diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts index 7c4ce23..a329fba 100644 --- a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts @@ -11,4 +11,6 @@ async function executeTCensecQualidadeAtoIndexData(data: TCensecQualidadeAtoInte }); } -export const TCensecQualidadeAtoIndexData = withClientErrorHandler(executeTCensecQualidadeAtoIndexData); \ No newline at end of file +export const TCensecQualidadeAtoIndexData = withClientErrorHandler( + executeTCensecQualidadeAtoIndexData, +); diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts index bc2ea01..45ffccc 100644 --- a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts @@ -11,4 +11,6 @@ async function executeTCensecQualidadeAtoRemoveData(data: TCensecQualidadeAtoInt }); } -export const TCensecQualidadeAtoRemoveData = withClientErrorHandler(executeTCensecQualidadeAtoRemoveData); +export const TCensecQualidadeAtoRemoveData = withClientErrorHandler( + executeTCensecQualidadeAtoRemoveData, +); diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts index e4f4bd4..cb062b6 100644 --- a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts @@ -4,7 +4,6 @@ import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; async function executeTCensecQualidadeAtoSaveData(data: TCensecQualidadeAtoInterface) { - // Instancia o cliente da API para enviar a requisição const api = new API(); @@ -16,4 +15,6 @@ async function executeTCensecQualidadeAtoSaveData(data: TCensecQualidadeAtoInter }); } -export const TCensecQualidadeAtoSaveData = withClientErrorHandler(executeTCensecQualidadeAtoSaveData); +export const TCensecQualidadeAtoSaveData = withClientErrorHandler( + executeTCensecQualidadeAtoSaveData, +); diff --git a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts index 312b784..428a2a9 100644 --- a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts @@ -1,14 +1,13 @@ -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/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'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecTipoAtoIndexData() { - const api = new API(); - return await api.send({ - method: Methods.GET, - endpoint: `administrativo/t_censec_tipoato/` - }); - + const api = new API(); + return await api.send({ + method: Methods.GET, + endpoint: `administrativo/t_censec_tipoato/`, + }); } -export const TCensecTipoAtoIndexData = withClientErrorHandler(executeTCensecTipoAtoIndexData) \ No newline at end of file +export const TCensecTipoAtoIndexData = withClientErrorHandler(executeTCensecTipoAtoIndexData); diff --git a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts index 467497e..0a54b86 100644 --- a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts @@ -1,17 +1,15 @@ -import API from "@/shared/services/api/Api"; -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import API from '@/shared/services/api/Api'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecTipoAtoRemoveData(data: TCensecTipoAtoInterface) { + const api = new API(); - const api = new API(); - - return await api.send({ - method: Methods.DELETE, - endpoint: `administrativo/t_censec_tipoato/${data.censec_tipoato_id}` - }); - + return await api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_censec_tipoato/${data.censec_tipoato_id}`, + }); } -export const TCensecTipoAtoRemoveData = withClientErrorHandler(executeTCensecTipoAtoRemoveData) \ No newline at end of file +export const TCensecTipoAtoRemoveData = withClientErrorHandler(executeTCensecTipoAtoRemoveData); diff --git a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts index d1d01f2..2105832 100644 --- a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts @@ -1,20 +1,18 @@ -import API from "@/shared/services/api/Api"; -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; +import API from '@/shared/services/api/Api'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecTipoAtoSaveData(data: TCensecTipoAtoInterface) { + const isUpdate = Boolean(data.censec_tipoato_id); - const isUpdate = Boolean(data.censec_tipoato_id); - - const api = new API(); - - return await api.send({ - method: isUpdate ? Methods.PUT : Methods.POST, - endpoint: `administrativo/t_censec_tipoato/${data.censec_tipoato_id || ''}`, - body: data - }); + const api = new API(); + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, + endpoint: `administrativo/t_censec_tipoato/${data.censec_tipoato_id || ''}`, + body: data, + }); } -export const TCensecTipoAtoSaveData = withClientErrorHandler(executeTCensecTipoAtoSaveData) \ No newline at end of file +export const TCensecTipoAtoSaveData = withClientErrorHandler(executeTCensecTipoAtoSaveData); diff --git a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts index 0a4d210..2132440 100644 --- a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts +++ b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts @@ -1,18 +1,20 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import TCensecTipoNaturezaInterface from "../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; -async function executeTCensecTipoNaturezaDeleteData(data: TCensecTipoNaturezaInterface): Promise { - - const api = new API(); - - return await api.send({ - method: Methods.DELETE, - endpoint: `administrativo/t_censec_tiponatureza/${data.censec_tiponatureza_id}` - }); +async function executeTCensecTipoNaturezaDeleteData( + data: TCensecTipoNaturezaInterface, +): Promise { + const api = new API(); + return await api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_censec_tiponatureza/${data.censec_tiponatureza_id}`, + }); } -export const TCensecTipoNaturezaDeleteData = withClientErrorHandler(executeTCensecTipoNaturezaDeleteData); \ No newline at end of file +export const TCensecTipoNaturezaDeleteData = withClientErrorHandler( + executeTCensecTipoNaturezaDeleteData, +); diff --git a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData.ts b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData.ts index 829179f..b8d934b 100644 --- a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData.ts +++ b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData.ts @@ -1,14 +1,16 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; async function executeTCensecTipoNaturezaIndexData(): Promise { - const api = new API(); - return api.send({ - method: Methods.GET, - endpoint: `administrativo/t_censec_tiponatureza` - }); + const api = new API(); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/t_censec_tiponatureza`, + }); } -export const TCensecTipoNaturezaIndexData = withClientErrorHandler(executeTCensecTipoNaturezaIndexData); \ No newline at end of file +export const TCensecTipoNaturezaIndexData = withClientErrorHandler( + executeTCensecTipoNaturezaIndexData, +); diff --git a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts index cfa9cd2..d40a679 100644 --- a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts +++ b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts @@ -1,26 +1,28 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import TCensecTipoNaturezaInterface from "../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -async function executeTCensecTipoNaturezaSaveData(data: TCensecTipoNaturezaInterface): Promise { +async function executeTCensecTipoNaturezaSaveData( + data: TCensecTipoNaturezaInterface, +): Promise { + console.log('executeTCensecTipoNaturezaSaveData', data); - console.log('executeTCensecTipoNaturezaSaveData', data) + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.censec_tiponatureza_id); - // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) - const isUpdate = Boolean(data.censec_tiponatureza_id); - - // Instancia o cliente da API para enviar a requisição - const api = new API(); - - // Executa a requisição para a API com o método apropriado e envia os dados no corpo - return await api.send({ - method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar - endpoint: `administrativo/t_censec_tiponatureza/${data.censec_tiponatureza_id || ''}`, // endpoint dinâmico - body: data, // payload enviado para a API - }); + // Instancia o cliente da API para enviar a requisição + const api = new API(); + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_censec_tiponatureza/${data.censec_tiponatureza_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); } -export const TCensecTipoNaturezaSaveData = withClientErrorHandler(executeTCensecTipoNaturezaSaveData); \ No newline at end of file +export const TCensecTipoNaturezaSaveData = withClientErrorHandler( + executeTCensecTipoNaturezaSaveData, +); diff --git a/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts b/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts index 156fcde..c4a17b6 100644 --- a/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts @@ -1,18 +1,16 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import TImovelInterface from "../../interfaces/TImovel/TImovelInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; async function executeTImovelDeleteData(data: TImovelInterface): Promise { + const api = new API(); - const api = new API(); - - return await api.send({ - method: Methods.DELETE, - endpoint: `administrativo/t_imovel/${data.imovel_id}` - }); - + return await api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_imovel/${data.imovel_id}`, + }); } -export const TImovelDeleteData = withClientErrorHandler(executeTImovelDeleteData); \ No newline at end of file +export const TImovelDeleteData = withClientErrorHandler(executeTImovelDeleteData); diff --git a/src/packages/administrativo/data/TImovel/TImovelIndexData.ts b/src/packages/administrativo/data/TImovel/TImovelIndexData.ts index bde6a06..833851c 100644 --- a/src/packages/administrativo/data/TImovel/TImovelIndexData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelIndexData.ts @@ -1,15 +1,17 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import { TImovelIndexDataInterface } from "../../interfaces/TImovel/TImovelIndexDataInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import { TImovelIndexDataInterface } from '../../interfaces/TImovel/TImovelIndexDataInterface'; -async function executeTImovelIndexData(data: TImovelIndexDataInterface): Promise { - const api = new API(); - return api.send({ - method: Methods.GET, - endpoint: `administrativo/t_imovel/classe/${data.tipo_classe}` - }); +async function executeTImovelIndexData( + data: TImovelIndexDataInterface, +): Promise { + const api = new API(); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/t_imovel/classe/${data.tipo_classe}`, + }); } -export const TImovelIndexData = withClientErrorHandler(executeTImovelIndexData); \ No newline at end of file +export const TImovelIndexData = withClientErrorHandler(executeTImovelIndexData); diff --git a/src/packages/administrativo/data/TImovel/TImovelSaveData.ts b/src/packages/administrativo/data/TImovel/TImovelSaveData.ts index 4628042..9ee8572 100644 --- a/src/packages/administrativo/data/TImovel/TImovelSaveData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelSaveData.ts @@ -1,24 +1,22 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import TImovelInterface from "../../interfaces/TImovel/TImovelInterface"; -import ApiResponseInterface from "@/shared/services/api/interfaces/ApiResponseInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTImovelSaveData(data: TImovelInterface): Promise { + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.imovel_id); - // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) - const isUpdate = Boolean(data.imovel_id); - - // Instancia o cliente da API para enviar a requisição - const api = new API(); - - // Executa a requisição para a API com o método apropriado e envia os dados no corpo - return await api.send({ - method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar - endpoint: `administrativo/t_imovel/${data.imovel_id || ''}`, // endpoint dinâmico - body: data, // payload enviado para a API - }); + // Instancia o cliente da API para enviar a requisição + const api = new API(); + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_imovel/${data.imovel_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); } -export const TImovelSaveData = withClientErrorHandler(executeTImovelSaveData); \ No newline at end of file +export const TImovelSaveData = withClientErrorHandler(executeTImovelSaveData); diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts index c0ea3b3..9028b80 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts @@ -1,14 +1,16 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TImovelUnidadeRuralInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; -import API from "@/shared/services/api/Api"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import API from '@/shared/services/api/Api'; async function executeTImovelUnidadeRuralDeleteData(data: TImovelUnidadeRuralInterface) { - const api = new API(); - return api.send({ - method: Methods.DELETE, - endpoint: `administrativo/t_imovel_unidade/${data.imovel_unidade_id}` - }); + const api = new API(); + return api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_imovel_unidade/${data.imovel_unidade_id}`, + }); } -export const TImovelUnidadeRuralDeleteData = withClientErrorHandler(executeTImovelUnidadeRuralDeleteData); \ No newline at end of file +export const TImovelUnidadeRuralDeleteData = withClientErrorHandler( + executeTImovelUnidadeRuralDeleteData, +); diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData.ts index 8a0889e..3ad620d 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData.ts @@ -1,16 +1,16 @@ -import TImovelUnidadePageInterface from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface"; -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import TImovelUnidadePageInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTImovelUnidadeRuralIndexData(data: TImovelUnidadePageInterface) { - - const api = new API(); - return await api.send({ - method: Methods.GET, - endpoint: `administrativo/t_imovel_unidade/imovel/${data.imovel_id}` - }); - + const api = new API(); + return await api.send({ + method: Methods.GET, + endpoint: `administrativo/t_imovel_unidade/imovel/${data.imovel_id}`, + }); } -export const TImovelUnidadeRuralIndexData = withClientErrorHandler(executeTImovelUnidadeRuralIndexData); \ No newline at end of file +export const TImovelUnidadeRuralIndexData = withClientErrorHandler( + executeTImovelUnidadeRuralIndexData, +); diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts index 20284bc..b168f6d 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts @@ -1,25 +1,25 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TImovelUnidadeRuralInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTImovelUnidadeRuralSaveData(data: TImovelUnidadeRuralInterface) { + console.log(data); - console.log(data); + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.imovel_unidade_id); - // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) - const isUpdate = Boolean(data.imovel_unidade_id); - - // Instancia o cliente da API para enviar a requisição - const api = new API(); - - // Executa a requisição para a API com o método apropriado e envia os dados no corpo - return await api.send({ - method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar - endpoint: `administrativo/t_imovel_unidade/${data.imovel_unidade_id || ''}`, // endpoint dinâmico - body: data, // payload enviado para a API - }); + // Instancia o cliente da API para enviar a requisição + const api = new API(); + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_imovel_unidade/${data.imovel_unidade_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); } -export const TImovelUnidadeRuralSaveData = withClientErrorHandler(executeTImovelUnidadeRuralSaveData); \ No newline at end of file +export const TImovelUnidadeRuralSaveData = withClientErrorHandler( + executeTImovelUnidadeRuralSaveData, +); diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts index 3f4c3b6..b3747f8 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts @@ -1,16 +1,16 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TImovelUnidadeUrbanoInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTImovelUnidadeUrbanoDeleteData(data: TImovelUnidadeUrbanoInterface) { - - const api = new API(); - return api.send({ - method: Methods.DELETE, - endpoint: `administrativo/t_imovel_unidade/${data.imovel_unidade_id}` - }); - + const api = new API(); + return api.send({ + method: Methods.DELETE, + endpoint: `administrativo/t_imovel_unidade/${data.imovel_unidade_id}`, + }); } -export const TImovelUnidadeUrbanoDeleteData = withClientErrorHandler(executeTImovelUnidadeUrbanoDeleteData); \ No newline at end of file +export const TImovelUnidadeUrbanoDeleteData = withClientErrorHandler( + executeTImovelUnidadeUrbanoDeleteData, +); diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData.ts index 3d05ad6..ddf36d8 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData.ts @@ -1,14 +1,16 @@ -import TImovelUnidadePageInterface from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface"; -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import TImovelUnidadePageInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTImovelUnidadeUrbanoIndexData(data: TImovelUnidadePageInterface) { - const api = new API(); - return api.send({ - method: Methods.GET, - endpoint: `administrativo/t_imovel_unidade/imovel/${data.imovel_id}` - }); + const api = new API(); + return api.send({ + method: Methods.GET, + endpoint: `administrativo/t_imovel_unidade/imovel/${data.imovel_id}`, + }); } -export const TImovelUnidadeUrbanoIndexData = withClientErrorHandler(executeTImovelUnidadeUrbanoIndexData); \ No newline at end of file +export const TImovelUnidadeUrbanoIndexData = withClientErrorHandler( + executeTImovelUnidadeUrbanoIndexData, +); diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts index d4ab5ca..199d4d9 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts @@ -1,23 +1,23 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TImovelUnidadeUrbanoInterface } from "@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface"; -import API from "@/shared/services/api/Api"; -import { Methods } from "@/shared/services/api/enums/ApiMethodEnum"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTImovelUnidadeUrbanoSaveData(data: TImovelUnidadeUrbanoInterface) { + // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) + const isUpdate = Boolean(data.imovel_unidade_id); - // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) - const isUpdate = Boolean(data.imovel_unidade_id); - - // Instancia o cliente da API para enviar a requisição - const api = new API(); - - // Executa a requisição para a API com o método apropriado e envia os dados no corpo - return await api.send({ - method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar - endpoint: `administrativo/t_imovel_unidade/${data.imovel_unidade_id || ''}`, // endpoint dinâmico - body: data, // payload enviado para a API - }); + // Instancia o cliente da API para enviar a requisição + const api = new API(); + // Executa a requisição para a API com o método apropriado e envia os dados no corpo + return await api.send({ + method: isUpdate ? Methods.PUT : Methods.POST, // PUT se atualizar, POST se criar + endpoint: `administrativo/t_imovel_unidade/${data.imovel_unidade_id || ''}`, // endpoint dinâmico + body: data, // payload enviado para a API + }); } -export const TImovelUnidadeUrbanoSaveData = withClientErrorHandler(executeTImovelUnidadeUrbanoSaveData); \ No newline at end of file +export const TImovelUnidadeUrbanoSaveData = withClientErrorHandler( + executeTImovelUnidadeUrbanoSaveData, +); diff --git a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData.ts b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData.ts index 9b3182f..a124817 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData.ts @@ -11,4 +11,4 @@ async function executeTPessoaFisicaRemoveData(data: TPessoaFisicaInterface) { }); } -export const TPessoaFisicaRemoveData = withClientErrorHandler(executeTPessoaFisicaRemoveData); \ No newline at end of file +export const TPessoaFisicaRemoveData = withClientErrorHandler(executeTPessoaFisicaRemoveData); diff --git a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData.ts b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData.ts index f6327b9..a7ebe37 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData.ts @@ -10,4 +10,4 @@ async function executeTPessoaJuridicaIndexData() { }); } -export const TPessoaJuridicaIndexData = withClientErrorHandler(executeTPessoaJuridicaIndexData); \ No newline at end of file +export const TPessoaJuridicaIndexData = withClientErrorHandler(executeTPessoaJuridicaIndexData); diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts index e3de22c..5915c09 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts @@ -11,4 +11,6 @@ async function executeTPessoaRepresentanteIndexData(data: TPessoaRepresentanteIn }); } -export const TPessoaRepresentanteIndexData = withClientErrorHandler(executeTPessoaRepresentanteIndexData); \ No newline at end of file +export const TPessoaRepresentanteIndexData = withClientErrorHandler( + executeTPessoaRepresentanteIndexData, +); diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts index dc6c016..35da219 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts @@ -11,4 +11,6 @@ async function executeTPessoaRepresentanteRemoveData(data: TPessoaRepresentanteI }); } -export const TPessoaRepresentanteRemoveData = withClientErrorHandler(executeTPessoaRepresentanteRemoveData); +export const TPessoaRepresentanteRemoveData = withClientErrorHandler( + executeTPessoaRepresentanteRemoveData, +); diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts index 69e3ba8..19191d7 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts @@ -4,7 +4,6 @@ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; async function executeTPessoaRepresentanteSaveData(data: TPessoaRepresentanteInterface) { - // Instancia o cliente da API para enviar a requisição const api = new API(); @@ -16,4 +15,6 @@ async function executeTPessoaRepresentanteSaveData(data: TPessoaRepresentanteInt }); } -export const TPessoaRepresentanteSaveData = withClientErrorHandler(executeTPessoaRepresentanteSaveData); +export const TPessoaRepresentanteSaveData = withClientErrorHandler( + executeTPessoaRepresentanteSaveData, +); diff --git a/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts b/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts index 6b22a8d..c102c19 100644 --- a/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts +++ b/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts @@ -1,6 +1,6 @@ -import { useResponse } from "@/shared/components/response/ResponseContext"; // Contexto global para gerenciar respostas da API -import GCidadeInterface from "@/packages/administrativo/interfaces/GCidade/GCidadeInterface"; // Interface tipada da cidade -import { GCidadeRemoveData } from "@/packages/administrativo/data/GCidade/GCidadeRemoveData"; // Função que remove a cidade via API +import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Interface tipada da cidade +import { GCidadeRemoveData } from '@/packages/administrativo/data/GCidade/GCidadeRemoveData'; // Função que remove a cidade via API // Hook customizado para remoção de cidades export const useGCidadeRemoveHook = () => { diff --git a/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts b/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts index 6629674..f0a7ce2 100644 --- a/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts +++ b/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts @@ -15,8 +15,7 @@ export const useGCidadeSaveHook = () => { // Manda a resposta para o verificador de resposta setResponse(response); - - } + }; return { gCidade, saveGCidade }; }; diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts index 1d424e9..4d5cada 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts @@ -1,7 +1,7 @@ -import { useResponse } from "@/shared/components/response/ResponseContext"; -import { useState } from "react"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; -import { GNaturezaDeleteService } from "../../services/GNatureza/GNaturezaDeleteService"; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; +import { GNaturezaDeleteService } from '../../services/GNatureza/GNaturezaDeleteService'; export const useGNaturezaDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts index f2b45ed..6a77c71 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts @@ -1,6 +1,6 @@ -import { useForm } from "react-hook-form"; -import { GNaturezaFormValues, GNaturezaSchema } from "../../schemas/GNatureza/GNaturezaSchema"; -import { zodResolver } from "@hookform/resolvers/zod"; +import { useForm } from 'react-hook-form'; +import { GNaturezaFormValues, GNaturezaSchema } from '../../schemas/GNatureza/GNaturezaSchema'; +import { zodResolver } from '@hookform/resolvers/zod'; export function useGNaturezaFormHook(defaults?: Partial) { return useForm({ diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts index 503145b..d6b8bfe 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts @@ -1,9 +1,9 @@ 'use client'; -import { useResponse } from "@/shared/components/response/ResponseContext"; -import { useState } from "react"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; -import { GNaturezaIndexService } from "../../services/GNatureza/GNaturezaIndexService"; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; +import { GNaturezaIndexService } from '../../services/GNatureza/GNaturezaIndexService'; export const useGNaturezaIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts index 2f3130e..6049f02 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts @@ -1,9 +1,9 @@ 'use client'; -import { useResponse } from "@/shared/components/response/ResponseContext"; -import { useState } from "react"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; -import { GNaturezaSaveService } from "../../services/GNatureza/GNaturezaSaveService"; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; +import { GNaturezaSaveService } from '../../services/GNatureza/GNaturezaSaveService'; export const useGNaturezaSaveHook = () => { const { setResponse } = useResponse(); @@ -30,4 +30,4 @@ export const useGNaturezaSaveHook = () => { }; return { gNatureza, saveGNatureza, isOpen, setIsOpen }; -}; \ No newline at end of file +}; diff --git a/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts index eeea75a..3039fdf 100644 --- a/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts +++ b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts @@ -23,5 +23,4 @@ export const useGTBBairroReadHook = () => { }; return useMemo(() => ({ gTBBairro, fetchGTBBairro }), [gTBBairro, fetchGTBBairro]); - }; diff --git a/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts index a42e25f..d9326c0 100644 --- a/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts +++ b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts @@ -13,5 +13,8 @@ export const useGTBTipoLogradouroReadHook = () => { setResponse(response); }; - return useMemo(() => ({ gTBTipoLogradouro, fetchGTBTipoLogradouro }), [gTBTipoLogradouro, fetchGTBTipoLogradouro]); -}; \ No newline at end of file + return useMemo( + () => ({ gTBTipoLogradouro, fetchGTBTipoLogradouro }), + [gTBTipoLogradouro, fetchGTBTipoLogradouro], + ); +}; diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts index cdd42a7..45246c0 100644 --- a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts @@ -1,6 +1,9 @@ -import { useForm } from "react-hook-form"; -import { TAtoParteTipoFormValues, TAtoParteTipoSchema } from "../../schemas/TAtoParteTipo/TAtoParteTipoSchema"; -import { zodResolver } from "@hookform/resolvers/zod"; +import { useForm } from 'react-hook-form'; +import { + TAtoParteTipoFormValues, + TAtoParteTipoSchema, +} from '../../schemas/TAtoParteTipo/TAtoParteTipoSchema'; +import { zodResolver } from '@hookform/resolvers/zod'; export function useTAtoParteTipoFormHook(defaults?: Partial) { return useForm({ @@ -10,4 +13,4 @@ export function useTAtoParteTipoFormHook(defaults?: Partial { return { tAtoParteTipo, - indexTAtoParteTipo + indexTAtoParteTipo, }; }; diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts index 4c0bd13..4a1c60a 100644 --- a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts @@ -1,6 +1,9 @@ -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { TCensecQualidadeFormValues, TCensecQualidadeSchema } from "../../schemas/TCensecQualidade/TCensecQualdiadeSchema"; +import { useForm } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { + TCensecQualidadeFormValues, + TCensecQualidadeSchema, +} from '../../schemas/TCensecQualidade/TCensecQualdiadeSchema'; export function useTCensecQualidadeFormHook(defaults?: Partial) { return useForm({ @@ -10,4 +13,4 @@ export function useTCensecQualidadeFormHook(defaults?: Partial { return { tCensecQualidade, - indexTCensecQualidade + indexTCensecQualidade, }; }; diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts index bcb1032..95a4b11 100644 --- a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts @@ -1,15 +1,18 @@ // hooks/useTPessoaForm.ts -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import TCensecQualidadeAtoInterface from "../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface"; -import { TCensecQualidadeAtoFormValues, TCensecQualidadeAtoSchema } from "../../schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema"; +import { useForm } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import { + TCensecQualidadeAtoFormValues, + TCensecQualidadeAtoSchema, +} from '../../schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema'; // Hook customizado export function useTCensecQualidadeAtoFormHook(defaults?: Partial) { - return useForm({ - resolver: zodResolver(TCensecQualidadeAtoSchema), - defaultValues: { - ...defaults, - }, - }); -} \ No newline at end of file + return useForm({ + resolver: zodResolver(TCensecQualidadeAtoSchema), + defaultValues: { + ...defaults, + }, + }); +} diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts index cfa480d..a1daa72 100644 --- a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts @@ -6,10 +6,11 @@ import { TCensecQualidadeAtoIndexService } from '../../services/TCensecQualidade export const useTCensecQualidadeAtoIndexHook = () => { const { setResponse } = useResponse(); - const [tPessoaRepresentante, setTCensecQualidadeAto] = useState([]); + const [tPessoaRepresentante, setTCensecQualidadeAto] = useState( + [], + ); const fetchTCensecQualidadeAto = async (data: TCensecQualidadeAtoInterface) => { - const response = await TCensecQualidadeAtoIndexService(data); setTCensecQualidadeAto(response.data); diff --git a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts index 2709ae0..aa7f8bd 100644 --- a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts @@ -1,23 +1,19 @@ -import { useResponse } from "@/shared/components/response/ResponseContext" -import { useState } from "react"; -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; -import { TCensecTipoAtoIndexService } from "../../services/TCensecTipoAto/TCensecTipoAtoIndexService"; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; +import { TCensecTipoAtoIndexService } from '../../services/TCensecTipoAto/TCensecTipoAtoIndexService'; export const useTCensecTipoAtoReadHook = () => { + const { setResponse } = useResponse(); + const [tCensecTipoAto, setTCensecTipoAto] = useState([]); - const { setResponse } = useResponse(); - const [tCensecTipoAto, setTCensecTipoAto] = useState([]); + const fetchTCensecTipoAto = async () => { + const response = await TCensecTipoAtoIndexService(); - const fetchTCensecTipoAto = async () => { + setTCensecTipoAto(response.data); - const response = await TCensecTipoAtoIndexService(); + setResponse(response); + }; - setTCensecTipoAto(response.data); - - setResponse(response); - - } - - return { tCensecTipoAto, fetchTCensecTipoAto } - -} \ No newline at end of file + return { tCensecTipoAto, fetchTCensecTipoAto }; +}; diff --git a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts index 6676d2b..6052552 100644 --- a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts @@ -1,19 +1,15 @@ -import { useResponse } from "@/shared/components/response/ResponseContext" -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; -import { TCensecTipoAtoRemoveService } from "../../services/TCensecTipoAto/TCensecTipoAtoRemoveService"; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; +import { TCensecTipoAtoRemoveService } from '../../services/TCensecTipoAto/TCensecTipoAtoRemoveService'; export const useTCensecTipoAtoRemoveHook = () => { + const { setResponse } = useResponse(); - const { setResponse } = useResponse(); + const removeTCensecTipoAto = async (data: TCensecTipoAtoInterface) => { + const response = await TCensecTipoAtoRemoveService(data); - const removeTCensecTipoAto = async (data: TCensecTipoAtoInterface) => { + setResponse(response); + }; - const response = await TCensecTipoAtoRemoveService(data); - - setResponse(response); - - } - - return { removeTCensecTipoAto } - -} \ No newline at end of file + return { removeTCensecTipoAto }; +}; diff --git a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts index 77e763a..d42ff98 100644 --- a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts @@ -1,28 +1,24 @@ -import { useResponse } from "@/shared/components/response/ResponseContext" -import { useState } from "react"; -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; -import { TCensecTipoAtoSaveService } from "../../services/TCensecTipoAto/TCensecTipoAtoSaveService"; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; +import { TCensecTipoAtoSaveService } from '../../services/TCensecTipoAto/TCensecTipoAtoSaveService'; export const useTCensecTipoAtoSaveHook = () => { + const { setResponse } = useResponse(); + const [tCensecTipoAto, setTCensecTipoAto] = useState(null); + const [isOpen, setIsOpen] = useState(false); - const { setResponse } = useResponse(); - const [tCensecTipoAto, setTCensecTipoAto] = useState(null); - const [isOpen, setIsOpen] = useState(false); + const saveTCensecTipoAto = async (data: TCensecTipoAtoInterface) => { + const response = await TCensecTipoAtoSaveService(data); - const saveTCensecTipoAto = async (data: TCensecTipoAtoInterface) => { + setTCensecTipoAto(response.data); - const response = await TCensecTipoAtoSaveService(data); + setResponse(response); - setTCensecTipoAto(response.data); + setIsOpen(false); - setResponse(response); + return response; + }; - setIsOpen(false); - - return response; - - } - - return { tCensecTipoAto, saveTCensecTipoAto } - -} \ No newline at end of file + return { tCensecTipoAto, saveTCensecTipoAto }; +}; diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts index 75d0c83..2367a53 100644 --- a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts @@ -1,6 +1,9 @@ -import { useForm } from "react-hook-form"; -import { TCensecTipoNaturezaFormValues, TCensecTipoNaturezaSchema } from "../../schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema"; -import { zodResolver } from "@hookform/resolvers/zod"; +import { useForm } from 'react-hook-form'; +import { + TCensecTipoNaturezaFormValues, + TCensecTipoNaturezaSchema, +} from '../../schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema'; +import { zodResolver } from '@hookform/resolvers/zod'; export function useTCensecTipoNaturezaFormHook(defaults?: Partial) { return useForm({ @@ -10,4 +13,4 @@ export function useTCensecTipoNaturezaFormHook(defaults?: Partial { const { setResponse } = useResponse(); - const [tCensecNaturezaTipo, setTCensecTipoNatureza] = useState([]); + const [tCensecNaturezaTipo, setTCensecTipoNatureza] = useState( + [], + ); const indexTCensecTipoNatureza = async () => { const response = await TCensecTipoNaturezaIndexService(); @@ -20,6 +22,6 @@ export const useTCensecTipoNaturezaIndexHook = () => { return { tCensecNaturezaTipo, - indexTCensecTipoNatureza + indexTCensecTipoNatureza, }; }; diff --git a/src/packages/administrativo/hooks/TImovel/useTImovelFormHook.ts b/src/packages/administrativo/hooks/TImovel/useTImovelFormHook.ts index fa56ab2..68c27bf 100644 --- a/src/packages/administrativo/hooks/TImovel/useTImovelFormHook.ts +++ b/src/packages/administrativo/hooks/TImovel/useTImovelFormHook.ts @@ -1,6 +1,6 @@ -import { useForm } from "react-hook-form"; -import { TImovelFormValues, TImovelSchema } from "../../schemas/TImovel/TImovelSchema"; -import { zodResolver } from "@hookform/resolvers/zod"; +import { useForm } from 'react-hook-form'; +import { TImovelFormValues, TImovelSchema } from '../../schemas/TImovel/TImovelSchema'; +import { zodResolver } from '@hookform/resolvers/zod'; export function useTImovelFormHook(defaults?: Partial) { return useForm({ @@ -10,4 +10,4 @@ export function useTImovelFormHook(defaults?: Partial) { ...defaults, }, }); -} \ No newline at end of file +} diff --git a/src/packages/administrativo/hooks/TImovel/useTImovelIndexHook.ts b/src/packages/administrativo/hooks/TImovel/useTImovelIndexHook.ts index d256c87..6e1e7b7 100644 --- a/src/packages/administrativo/hooks/TImovel/useTImovelIndexHook.ts +++ b/src/packages/administrativo/hooks/TImovel/useTImovelIndexHook.ts @@ -21,6 +21,6 @@ export const useTImovelIndexHook = () => { return { tImovel, - indexTImovel + indexTImovel, }; }; diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook.ts index ac18f23..4c24936 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook.ts @@ -1,6 +1,9 @@ -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { TImovelUnidadeRuralFormValues, TImovelUnidadeRuralSchema } from "@/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema"; +import { useForm } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { + TImovelUnidadeRuralFormValues, + TImovelUnidadeRuralSchema, +} from '@/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema'; export function useTImovelUnidadeRuralFormHook(defaults?: Partial) { return useForm({ @@ -10,4 +13,4 @@ export function useTImovelUnidadeRuralFormHook(defaults?: Partial { const { setResponse } = useResponse(); - const [tImovelUnidadeRural, setTImovelUnidadeRural] = useState([]); + const [tImovelUnidadeRural, setTImovelUnidadeRural] = useState( + [], + ); const indexTImovelUnidadeRural = async (data: TImovelUnidadeInterface) => { const response = await TImovelUnidadeRuralIndexService(data); @@ -23,6 +25,6 @@ export const useTImovelUnidadeRuralIndexHook = () => { return { tImovelUnidadeRural, - indexTImovelUnidadeRural + indexTImovelUnidadeRural, }; }; diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook.ts index eb7fd9f..e700a3a 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook.ts @@ -30,5 +30,4 @@ export const useTImovelUnidadeRuralSaveHook = () => { }; return { tImovelUnidadeRural, saveTImovelUnidadeRural }; - }; diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook.ts index 771d834..e549878 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook.ts @@ -1,8 +1,13 @@ -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { TImovelUnidadeUrbanoFormValues, TImovelUnidadeUrbanoSchema } from "@/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema"; +import { useForm } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { + TImovelUnidadeUrbanoFormValues, + TImovelUnidadeUrbanoSchema, +} from '@/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema'; -export function useTImovelUnidadeUrbanoFormHook(defaults?: Partial) { +export function useTImovelUnidadeUrbanoFormHook( + defaults?: Partial, +) { return useForm({ resolver: zodResolver(TImovelUnidadeUrbanoSchema), defaultValues: { @@ -28,4 +33,4 @@ export function useTImovelUnidadeUrbanoFormHook(defaults?: Partial { const { setResponse } = useResponse(); - const [tImovelUnidadeUrbano, setTImovelUnidadeUrbano] = useState([]); + const [tImovelUnidadeUrbano, setTImovelUnidadeUrbano] = useState( + [], + ); const indexTImovelUnidadeUrbano = async (data: TImovelUnidadePageInterface) => { - const response = await TImovelUnidadeUrbanoIndexService(data); // Armazena os dados consultados @@ -24,6 +25,6 @@ export const useTImovelUnidadeUrbanoIndexHook = () => { return { tImovelUnidadeUrbano, - indexTImovelUnidadeUrbano + indexTImovelUnidadeUrbano, }; }; diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook.ts index 2ec4d64..17ff9e2 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook.ts @@ -14,7 +14,6 @@ export const useTImovelUnidadeUrbanoSaveHook = () => { const [isOpen, setIsOpen] = useState(false); const saveTImovelUnidadeUrbano = async (data: TImovelUnidadeUrbanoInterface) => { - const response = await TImovelUnidadeUrbanoSaveService(data); // Armazena os dados da repsota @@ -31,5 +30,4 @@ export const useTImovelUnidadeUrbanoSaveHook = () => { }; return { tImovelUnidadeUrbano, saveTImovelUnidadeUrbano }; - }; diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook.ts index 0d86383..b03de96 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook.ts @@ -12,4 +12,4 @@ export const useTPessoaFisicaDeleteHook = () => { }; return { deleteTPessoaFisica }; -}; \ No newline at end of file +}; diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook.ts index 1fa7a9b..c1fa4ad 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook.ts @@ -1,15 +1,18 @@ // hooks/useTPessoaForm.ts -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { TPessoaFisicaFormValues, TPessoaFisicaSchema } from "@/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema"; +import { useForm } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { + TPessoaFisicaFormValues, + TPessoaFisicaSchema, +} from '@/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema'; // Hook customizado export function useTPessoaFisicaFormHook(defaults?: Partial) { - return useForm({ - resolver: zodResolver(TPessoaFisicaSchema), - defaultValues: { - pessoa_id: 0, - ...defaults, - }, - }); -} \ No newline at end of file + return useForm({ + resolver: zodResolver(TPessoaFisicaSchema), + defaultValues: { + pessoa_id: 0, + ...defaults, + }, + }); +} diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook.ts index 8df6387..5b06eb7 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook.ts @@ -14,7 +14,6 @@ export const useTPessoaFisicaSaveHook = () => { const [isOpen, setIsOpen] = useState(false); const saveTPessoaFisica = async (data: TPessoaFisicaInterface) => { - const response = await TPessoaFisicaSaveService(data); // Armazena os dados da repsota diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook.ts index b507310..baf726c 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook.ts @@ -1,13 +1,16 @@ -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { TPessoaJuridicaFormValues, TPessoaJuridicaSchema } from "@/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema"; +import { useForm } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { + TPessoaJuridicaFormValues, + TPessoaJuridicaSchema, +} from '@/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema'; export function useTPessoaJuridicaFormHook(defaults?: Partial) { - return useForm({ - resolver: zodResolver(TPessoaJuridicaSchema), - defaultValues: { - pessoa_id: 0, - ...defaults, - }, - }); -} \ No newline at end of file + return useForm({ + resolver: zodResolver(TPessoaJuridicaSchema), + defaultValues: { + pessoa_id: 0, + ...defaults, + }, + }); +} diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook.ts index dd09703..dcfb55e 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook.ts @@ -30,4 +30,4 @@ export const useTPessoaJuridicaSaveHook = () => { }; return { tPessoaJuridica, saveTPessoaJuridica }; -}; \ No newline at end of file +}; diff --git a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook.ts b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook.ts index 22eb9e5..503b237 100644 --- a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook.ts +++ b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook.ts @@ -1,15 +1,18 @@ // hooks/useTPessoaForm.ts -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; -import TPessoaRepresentanteInterface from "../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface"; -import { TPessoaRepresentanteFormValues, TPessoaRepresentanteSchema } from "../../schemas/TPessoaRepresentante/TPessoaRepresentanteSchema"; +import { useForm } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; +import { + TPessoaRepresentanteFormValues, + TPessoaRepresentanteSchema, +} from '../../schemas/TPessoaRepresentante/TPessoaRepresentanteSchema'; // Hook customizado export function useTPessoaRepresentanteFormHook(defaults?: Partial) { - return useForm({ - resolver: zodResolver(TPessoaRepresentanteSchema), - defaultValues: { - ...defaults, - }, - }); -} \ No newline at end of file + return useForm({ + resolver: zodResolver(TPessoaRepresentanteSchema), + defaultValues: { + ...defaults, + }, + }); +} diff --git a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook.ts b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook.ts index 51a3c3e..f3fd703 100644 --- a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook.ts +++ b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook.ts @@ -6,10 +6,11 @@ import { TPessoaRepresentanteIndexService } from '../../services/TPessoaRepresen export const useTPessoaRepresentanteIndexHook = () => { const { setResponse } = useResponse(); - const [tPessoaRepresentante, setTPessoaRepresentante] = useState([]); + const [tPessoaRepresentante, setTPessoaRepresentante] = useState( + [], + ); const fetchTPessoaRepresentante = async (data: TPessoaRepresentanteInterface) => { - const response = await TPessoaRepresentanteIndexService(data); setTPessoaRepresentante(response.data); diff --git a/src/packages/administrativo/interfaces/GNatureza/GNaturezaFormInterface.ts b/src/packages/administrativo/interfaces/GNatureza/GNaturezaFormInterface.ts index 57aae98..3b390f7 100644 --- a/src/packages/administrativo/interfaces/GNatureza/GNaturezaFormInterface.ts +++ b/src/packages/administrativo/interfaces/GNatureza/GNaturezaFormInterface.ts @@ -1,4 +1,4 @@ -import { GNaturezaFormValues } from "../../schemas/GNatureza/GNaturezaSchema"; +import { GNaturezaFormValues } from '../../schemas/GNatureza/GNaturezaSchema'; export interface GNaturezaFormInterface { isOpen: boolean; @@ -6,4 +6,4 @@ export interface GNaturezaFormInterface { onClose: (item: null, isFormStatus: boolean) => void; onSave: (data: GNaturezaFormValues) => void; buttonIsLoading: boolean; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/GNatureza/GNaturezaIndexInterface.ts b/src/packages/administrativo/interfaces/GNatureza/GNaturezaIndexInterface.ts index d2e02bb..2bdf70e 100644 --- a/src/packages/administrativo/interfaces/GNatureza/GNaturezaIndexInterface.ts +++ b/src/packages/administrativo/interfaces/GNatureza/GNaturezaIndexInterface.ts @@ -1,3 +1,3 @@ export interface GNaturezaIndexInterface { - sistema_id: number -} \ No newline at end of file + sistema_id: number; +} diff --git a/src/packages/administrativo/interfaces/GNatureza/GNaturezaInterface.ts b/src/packages/administrativo/interfaces/GNatureza/GNaturezaInterface.ts index 85e6f71..11314ed 100644 --- a/src/packages/administrativo/interfaces/GNatureza/GNaturezaInterface.ts +++ b/src/packages/administrativo/interfaces/GNatureza/GNaturezaInterface.ts @@ -1,8 +1,8 @@ export default interface GNaturezaInterface { - natureza_id?: number; - descricao?: string; - situacao?: string; - sistema_id?: number; - pedir_numero_imovel?: string; - controle_frenteverso?: string; -} \ No newline at end of file + natureza_id?: number; + descricao?: string; + situacao?: string; + sistema_id?: number; + pedir_numero_imovel?: string; + controle_frenteverso?: string; +} diff --git a/src/packages/administrativo/interfaces/GNatureza/GNaturezaTableInterface.ts b/src/packages/administrativo/interfaces/GNatureza/GNaturezaTableInterface.ts index f91520e..390fe9c 100644 --- a/src/packages/administrativo/interfaces/GNatureza/GNaturezaTableInterface.ts +++ b/src/packages/administrativo/interfaces/GNatureza/GNaturezaTableInterface.ts @@ -1,7 +1,7 @@ -import GNaturezaInterface from "./GNaturezaInterface"; +import GNaturezaInterface from './GNaturezaInterface'; export default interface GNaturezaTableInterface { - data?: GNaturezaInterface[]; - onEdit: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data?: GNaturezaInterface[]; + onEdit: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: GNaturezaInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/GTBBairro/GTBairroSelectInterface.ts b/src/packages/administrativo/interfaces/GTBBairro/GTBairroSelectInterface.ts index e075046..bd695f8 100644 --- a/src/packages/administrativo/interfaces/GTBBairro/GTBairroSelectInterface.ts +++ b/src/packages/administrativo/interfaces/GTBBairro/GTBairroSelectInterface.ts @@ -1,6 +1,6 @@ export default interface GTBairroSelectInterface { - field?: { - value?: number | string; - onChange?: (value: string | number) => void; - }; -} \ No newline at end of file + field?: { + value?: number | string; + onChange?: (value: string | number) => void; + }; +} diff --git a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoFormInterface.ts b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoFormInterface.ts index cd6dc9f..1994bc9 100644 --- a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoFormInterface.ts +++ b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoFormInterface.ts @@ -1,4 +1,4 @@ -import { TAtoParteTipoFormValues } from "../../schemas/TAtoParteTipo/TAtoParteTipoSchema"; +import { TAtoParteTipoFormValues } from '../../schemas/TAtoParteTipo/TAtoParteTipoSchema'; export interface TAtoParteTipoFormInterface { isOpen: boolean; @@ -6,4 +6,4 @@ export interface TAtoParteTipoFormInterface { onClose: (item: null, isFormStatus: boolean) => void; onSave: (data: TAtoParteTipoFormValues) => void; buttonIsLoading: boolean; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface.ts b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface.ts index 00a37d2..fbf287c 100644 --- a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface.ts +++ b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface.ts @@ -1,11 +1,11 @@ export default interface TAtoParteTipoInterface { - ato_partetipo_id?: number; - descricao?: string; - tipo_parte?: number; - auto_qualifica?: string; - declara_doi?: string; - possui_documento_ext?: string; - situacao?: string; - texto?: string; - censec_qualidade_id?: number; -} \ No newline at end of file + ato_partetipo_id?: number; + descricao?: string; + tipo_parte?: number; + auto_qualifica?: string; + declara_doi?: string; + possui_documento_ext?: string; + situacao?: string; + texto?: string; + censec_qualidade_id?: number; +} diff --git a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoTableInterface.ts b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoTableInterface.ts index 89422cf..99aaa6f 100644 --- a/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoTableInterface.ts +++ b/src/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoTableInterface.ts @@ -1,7 +1,7 @@ -import TAtoParteTipoInterface from "./TAtoParteTipoInterface"; +import TAtoParteTipoInterface from './TAtoParteTipoInterface'; export default interface TAtoParteTipoTableInterface { - data?: TAtoParteTipoInterface[]; - onEdit: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data?: TAtoParteTipoInterface[]; + onEdit: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface.ts b/src/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface.ts index ec119f0..cad9b4e 100644 --- a/src/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface.ts @@ -1,4 +1,4 @@ -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; export interface TCensecNaturezaLitigioInterface { censec_naturezalitigio_id?: number; diff --git a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeFormInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeFormInterface.ts index a01846a..e4f2222 100644 --- a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeFormInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeFormInterface.ts @@ -1,4 +1,4 @@ -import { TCensecQualidadeFormValues } from "../../schemas/TCensecQualidade/TCensecQualdiadeSchema"; +import { TCensecQualidadeFormValues } from '../../schemas/TCensecQualidade/TCensecQualdiadeSchema'; export interface TCensecQualidadeFormInterface { isOpen: boolean; @@ -6,4 +6,4 @@ export interface TCensecQualidadeFormInterface { onClose: (item: null, isFormStatus: boolean) => void; onSave: (data: TCensecQualidadeFormValues) => void; buttonIsLoading: boolean; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface.ts index b82a048..d412287 100644 --- a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface.ts @@ -1,9 +1,9 @@ -import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; export default interface TCensecQualidadeInterface { - censec_qualidade_id?: number, - descricao?: string, - situacao?: SituacoesEnum, - aceita_cnpj?: ConfirmacaoEnum, -} \ No newline at end of file + censec_qualidade_id?: number; + descricao?: string; + situacao?: SituacoesEnum; + aceita_cnpj?: ConfirmacaoEnum; +} diff --git a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeTableInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeTableInterface.ts index c86addb..75614d5 100644 --- a/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeTableInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeTableInterface.ts @@ -1,7 +1,7 @@ -import TCensecQualidadeInterface from "./TCensecQualidadeInterface"; +import TCensecQualidadeInterface from './TCensecQualidadeInterface'; export default interface TCensecQualidadeTableInterface { - data?: TCensecQualidadeInterface[]; - onEdit: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data?: TCensecQualidadeInterface[]; + onEdit: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface.ts index 77690d7..2fb06bd 100644 --- a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface.ts @@ -1,9 +1,9 @@ -import { TCensecQualidadeAtoFormValues } from "../../schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema"; +import { TCensecQualidadeAtoFormValues } from '../../schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema'; export default interface TCensecQualidadeAtoFormInterface { - isOpen: boolean; - data: TCensecQualidadeAtoFormValues | null; - onClose: (item: null, isFormStatus: boolean) => void; - onSave: (data: TCensecQualidadeAtoFormValues) => void; - buttonIsLoading: boolean; + isOpen: boolean; + data: TCensecQualidadeAtoFormValues | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: TCensecQualidadeAtoFormValues) => void; + buttonIsLoading: boolean; } diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface.ts index e6a742f..c42c743 100644 --- a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface.ts @@ -1,6 +1,6 @@ export default interface TCensecQualidadeAtoInterface { - censec_qualidadeato_id?: number; - censec_tipoato_id?: number; - censec_qualidade_id?: number; - qtd_minima?: number; -} \ No newline at end of file + censec_qualidadeato_id?: number; + censec_tipoato_id?: number; + censec_qualidade_id?: number; + qtd_minima?: number; +} diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoJoinedInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoJoinedInterface.ts index 589f6fe..289185b 100644 --- a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoJoinedInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoJoinedInterface.ts @@ -1,5 +1,5 @@ -import TCensecQualidadeAtoInterface from "./TCensecQualidadeAtoInterface"; +import TCensecQualidadeAtoInterface from './TCensecQualidadeAtoInterface'; export default interface TCensecQualidadeAtoJoinedInterface extends TCensecQualidadeAtoInterface { - tcq_descricao?: string -} \ No newline at end of file + tcq_descricao?: string; +} diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface.ts index 8229335..441927d 100644 --- a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface.ts @@ -1,3 +1,3 @@ export default interface TCensecQualidadeAtoJoinedInterface { - censec_tipoato_id?: number -} \ No newline at end of file + censec_tipoato_id?: number; +} diff --git a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface.ts b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface.ts index 37cd152..316e9c2 100644 --- a/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecQualidadeAto/TCensecQualidadeAtoTableInterface.ts @@ -1,7 +1,7 @@ -import TCensecQualidadeAtoJoinedInterface from "./TCensecQualidadeAtoPageInterface"; +import TCensecQualidadeAtoJoinedInterface from './TCensecQualidadeAtoPageInterface'; export default interface TCensecQualidadeAtoTableInterface { - data: TCensecQualidadeAtoJoinedInterface[]; - onEdit: (item: TCensecQualidadeAtoJoinedInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TCensecQualidadeAtoJoinedInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data: TCensecQualidadeAtoJoinedInterface[]; + onEdit: (item: TCensecQualidadeAtoJoinedInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TCensecQualidadeAtoJoinedInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/TCensecTipoAto/TCensecTipoAtoInterface.ts b/src/packages/administrativo/interfaces/TCensecTipoAto/TCensecTipoAtoInterface.ts index b2da29e..aa4a579 100644 --- a/src/packages/administrativo/interfaces/TCensecTipoAto/TCensecTipoAtoInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecTipoAto/TCensecTipoAtoInterface.ts @@ -1,4 +1,4 @@ -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; export interface TCensecTipoAtoInterface { censec_tipoato_id: number; @@ -6,6 +6,6 @@ export interface TCensecTipoAtoInterface { codigo: number | null; descricao: string; situacao: SituacoesEnum; - tipo_separacao: "S" | "N" | null; - tipo_revogacao: "S" | "N" | null; -} \ No newline at end of file + tipo_separacao: 'S' | 'N' | null; + tipo_revogacao: 'S' | 'N' | null; +} diff --git a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface.ts b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface.ts index 19f59c7..5140b76 100644 --- a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface.ts @@ -1,4 +1,4 @@ -import { TCensecTipoNaturezaFormValues } from "../../schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema"; +import { TCensecTipoNaturezaFormValues } from '../../schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema'; export interface TCensecTipoNaturezaFormInterface { isOpen: boolean; @@ -6,4 +6,4 @@ export interface TCensecTipoNaturezaFormInterface { onClose: (item: null, isFormStatus: boolean) => void; onSave: (data: TCensecTipoNaturezaFormValues) => void; buttonIsLoading: boolean; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface.ts b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface.ts index 6837b49..5b2e248 100644 --- a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface.ts @@ -1,10 +1,10 @@ export default interface TCensecTipoNaturezaInterface { - censec_tiponatureza_id?: number; - censec_tipoato_id?: number; - descricao?: string; - possui_ato_anterior?: string; - codigo?: number; - obrigatorio?: string; - tipo_ato_anterior?: string; - situacao_ato_anterior?: string; -} \ No newline at end of file + censec_tiponatureza_id?: number; + censec_tipoato_id?: number; + descricao?: string; + possui_ato_anterior?: string; + codigo?: number; + obrigatorio?: string; + tipo_ato_anterior?: string; + situacao_ato_anterior?: string; +} diff --git a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface.ts b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface.ts index b241f15..f003190 100644 --- a/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface.ts +++ b/src/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface.ts @@ -1,7 +1,7 @@ -import TCensecTipoNaturezaInterface from "./TCensecTipoNaturezaInterface"; +import TCensecTipoNaturezaInterface from './TCensecTipoNaturezaInterface'; export default interface TCensecTipoNaturezaTableInterface { - data?: TCensecTipoNaturezaInterface[]; - onEdit: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data?: TCensecTipoNaturezaInterface[]; + onEdit: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/TImovel/TImovelFormInterface.ts b/src/packages/administrativo/interfaces/TImovel/TImovelFormInterface.ts index 5431d3e..fa3190a 100644 --- a/src/packages/administrativo/interfaces/TImovel/TImovelFormInterface.ts +++ b/src/packages/administrativo/interfaces/TImovel/TImovelFormInterface.ts @@ -1,4 +1,4 @@ -import { TImovelFormValues } from "../../schemas/TImovel/TImovelSchema"; +import { TImovelFormValues } from '../../schemas/TImovel/TImovelSchema'; export interface TImovelFormInterface { isOpen: boolean; @@ -7,4 +7,4 @@ export interface TImovelFormInterface { onSave: (data: TImovelFormValues) => void; buttonIsLoading: boolean; tipoClasse: number; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TImovel/TImovelIndexDataInterface.ts b/src/packages/administrativo/interfaces/TImovel/TImovelIndexDataInterface.ts index 125616e..6ffcf64 100644 --- a/src/packages/administrativo/interfaces/TImovel/TImovelIndexDataInterface.ts +++ b/src/packages/administrativo/interfaces/TImovel/TImovelIndexDataInterface.ts @@ -1,3 +1,3 @@ export interface TImovelIndexDataInterface { - tipo_classe: number, -} \ No newline at end of file + tipo_classe: number; +} diff --git a/src/packages/administrativo/interfaces/TImovel/TImovelIndexInterface.ts b/src/packages/administrativo/interfaces/TImovel/TImovelIndexInterface.ts index 7dad419..9675fa8 100644 --- a/src/packages/administrativo/interfaces/TImovel/TImovelIndexInterface.ts +++ b/src/packages/administrativo/interfaces/TImovel/TImovelIndexInterface.ts @@ -1,5 +1,5 @@ export interface TImovelIndexInterface { - pageTitle: string, - pageDescription: string, - tipoClasse: number -} \ No newline at end of file + pageTitle: string; + pageDescription: string; + tipoClasse: number; +} diff --git a/src/packages/administrativo/interfaces/TImovel/TImovelInterface.ts b/src/packages/administrativo/interfaces/TImovel/TImovelInterface.ts index 26ccbec..1c5ec75 100644 --- a/src/packages/administrativo/interfaces/TImovel/TImovelInterface.ts +++ b/src/packages/administrativo/interfaces/TImovel/TImovelInterface.ts @@ -1,16 +1,16 @@ export default interface TImovelInterface { - imovel_id?: number, - tipo_classe?: number, - tipo_registro?: string, - data_registro?: string, - numero?: number, - numero_letra?: string, - cidade?: string, - cep?: string, - uf?: string, - tb_bairro_id?: number, - cartorio?: number, - livro?: string, - cns?: number, - gtbb_descricao?: string, -} \ No newline at end of file + imovel_id?: number; + tipo_classe?: number; + tipo_registro?: string; + data_registro?: string; + numero?: number; + numero_letra?: string; + cidade?: string; + cep?: string; + uf?: string; + tb_bairro_id?: number; + cartorio?: number; + livro?: string; + cns?: number; + gtbb_descricao?: string; +} diff --git a/src/packages/administrativo/interfaces/TImovel/TImovelTabelInterface.ts b/src/packages/administrativo/interfaces/TImovel/TImovelTabelInterface.ts index a9185c6..337490b 100644 --- a/src/packages/administrativo/interfaces/TImovel/TImovelTabelInterface.ts +++ b/src/packages/administrativo/interfaces/TImovel/TImovelTabelInterface.ts @@ -1,7 +1,7 @@ -import TImovelInterface from "./TImovelInterface"; +import TImovelInterface from './TImovelInterface'; export default interface TImovelTableInterface { - data?: TImovelInterface[]; - onEdit: (item: TImovelInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TImovelInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data?: TImovelInterface[]; + onEdit: (item: TImovelInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TImovelInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeInterface.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeInterface.ts index 25e34d7..8809c36 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeInterface.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeInterface.ts @@ -3,4 +3,4 @@ export default interface TImovelUnidadeInterface { imovel_id?: number; area?: number; area_descritiva?: string; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface.ts index da9256a..b06f925 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface.ts @@ -1,3 +1,3 @@ export default interface TImovelUnidadePageInterface { - imovel_id?: number; -} \ No newline at end of file + imovel_id?: number; +} diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural.ts index f025777..1840735 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural.ts @@ -1,5 +1,5 @@ -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; -import TImovelUnidadeInterface from "../TImovelUnidadeInterface"; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import TImovelUnidadeInterface from '../TImovelUnidadeInterface'; export interface TImovelUnidadeRuralInterface extends TImovelUnidadeInterface { galpao?: string; diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface.ts index 06f4561..dd47f13 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface.ts @@ -1,4 +1,4 @@ -import { TImovelUnidadeRuralFormValues } from "@/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema"; +import { TImovelUnidadeRuralFormValues } from '@/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema'; export interface TImovelUnidadeRuralFormInterface { isOpen: boolean; @@ -6,4 +6,4 @@ export interface TImovelUnidadeRuralFormInterface { onClose: (item: null, isFormStatus: boolean) => void; onSave: (data: TImovelUnidadeRuralFormValues) => void; buttonIsLoading: boolean; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTableInterface.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTableInterface.ts index a335739..9a3267a 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTableInterface.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTableInterface.ts @@ -1,7 +1,7 @@ -import { TImovelUnidadeRuralInterface } from "./TImovelUnidadeRural"; +import { TImovelUnidadeRuralInterface } from './TImovelUnidadeRural'; export default interface TImovelUnidadeRuralTableInterface { data: TImovelUnidadeRuralInterface[]; onEdit: (item: TImovelUnidadeRuralInterface, isEditingFormStatus: boolean) => void; onDelete: (item: TImovelUnidadeRuralInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoFormInterface.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoFormInterface.ts index 8a646a9..8a612ea 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoFormInterface.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoFormInterface.ts @@ -1,4 +1,4 @@ -import { TImovelUnidadeUrbanoFormValues } from "@/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema"; +import { TImovelUnidadeUrbanoFormValues } from '@/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema'; export interface TImovelUnidadeUrbanoFormInterface { isOpen: boolean; diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface.ts index ab13fee..e4935b5 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface.ts @@ -1,4 +1,4 @@ -import TImovelUnidadeInterface from "../TImovelUnidadeInterface"; +import TImovelUnidadeInterface from '../TImovelUnidadeInterface'; export interface TImovelUnidadeUrbanoInterface extends TImovelUnidadeInterface { quadra?: string; diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTableInterface.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTableInterface.ts index 16e96a3..da390ae 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTableInterface.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTableInterface.ts @@ -1,7 +1,7 @@ -import { TImovelUnidadeUrbanoInterface } from "./TImovelUnidadeUrbanoInterface"; +import { TImovelUnidadeUrbanoInterface } from './TImovelUnidadeUrbanoInterface'; export default interface TImovelUnidadeUrbanoTableInterface { data: TImovelUnidadeUrbanoInterface[]; onEdit: (item: TImovelUnidadeUrbanoInterface, isEditingFormStatus: boolean) => void; onDelete: (item: TImovelUnidadeUrbanoInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaFormInterface.ts b/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaFormInterface.ts index 1f9425e..3e77e93 100644 --- a/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaFormInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaFormInterface.ts @@ -1,9 +1,9 @@ -import { TPessoaFisicaFormValues } from "../../../schemas/TPessoa/TPessoaFisicaSchema"; +import { TPessoaFisicaFormValues } from '../../../schemas/TPessoa/TPessoaFisicaSchema'; export default interface TPessoaFisicaFormInterface { - isOpen: boolean; - data: TPessoaFisicaFormValues | null; - onClose: (item: null, isFormStatus: boolean) => void; - onSave: (data: TPessoaFisicaFormValues) => void; - buttonIsLoading: boolean; -} \ No newline at end of file + isOpen: boolean; + data: TPessoaFisicaFormValues | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: TPessoaFisicaFormValues) => void; + buttonIsLoading: boolean; +} diff --git a/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface.ts b/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface.ts index e2fdb83..2afcc66 100644 --- a/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface.ts @@ -1,34 +1,34 @@ -import TPessoaInterface from "../TPessoaInterface"; +import TPessoaInterface from '../TPessoaInterface'; export default interface TPessoaFisicaInterface extends TPessoaInterface { - nacionalidade?: string; - tb_documentotipo_id?: number; - tb_profissao_id?: number; - tb_estadocivil_id?: number; - nome_pai?: string; - nome_mae?: string; - data_nascimento?: string; - sexo?: string; - tb_regimecomunhao_id?: number; - pessoa_conjuge_id?: number; - documento_expedicao?: string; - documento_validade?: string; - cert_casamento_numero?: string; - cert_casamento_folha?: string; - cert_casamento_livro?: string; - cert_casamento_cartorio?: string; - cert_casamento_data?: string; - cert_casamento_lei?: string; - pessoa_conjuge_nome?: string; - estrangeiro_nat?: string; - estrangeiro_nat_tb_pais_id?: number; - estrangeiro_res_tb_pais_id?: number; - estrangeiro_res?: string; - documento_orgao?: string; - documento_uf?: string; - uf_residencia?: string; - deficiencias?: string; - grau_instrucao?: string; - cidade_nat_id?: number; - email?: string; + nacionalidade?: string; + tb_documentotipo_id?: number; + tb_profissao_id?: number; + tb_estadocivil_id?: number; + nome_pai?: string; + nome_mae?: string; + data_nascimento?: string; + sexo?: string; + tb_regimecomunhao_id?: number; + pessoa_conjuge_id?: number; + documento_expedicao?: string; + documento_validade?: string; + cert_casamento_numero?: string; + cert_casamento_folha?: string; + cert_casamento_livro?: string; + cert_casamento_cartorio?: string; + cert_casamento_data?: string; + cert_casamento_lei?: string; + pessoa_conjuge_nome?: string; + estrangeiro_nat?: string; + estrangeiro_nat_tb_pais_id?: number; + estrangeiro_res_tb_pais_id?: number; + estrangeiro_res?: string; + documento_orgao?: string; + documento_uf?: string; + uf_residencia?: string; + deficiencias?: string; + grau_instrucao?: string; + cidade_nat_id?: number; + email?: string; } diff --git a/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaTableInterface.ts b/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaTableInterface.ts index 10898d3..730ee33 100644 --- a/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaTableInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaTableInterface.ts @@ -1,7 +1,7 @@ -import TPessoaFisicaInterface from "./TPessoaFisicaInterface"; +import TPessoaFisicaInterface from './TPessoaFisicaInterface'; export default interface TPessoaFisicaTableInterface { - data: TPessoaFisicaInterface[]; - onEdit: (item: TPessoaFisicaInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TPessoaFisicaInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data: TPessoaFisicaInterface[]; + onEdit: (item: TPessoaFisicaInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TPessoaFisicaInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/TPessoa/TPessoaIndexDataInterface.ts b/src/packages/administrativo/interfaces/TPessoa/TPessoaIndexDataInterface.ts index d9d6fe4..a962841 100644 --- a/src/packages/administrativo/interfaces/TPessoa/TPessoaIndexDataInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoa/TPessoaIndexDataInterface.ts @@ -1,3 +1,3 @@ export default interface TPessoaIndexDataInterface { pessoa_tipo?: string; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TPessoa/TPessoaInterface.ts b/src/packages/administrativo/interfaces/TPessoa/TPessoaInterface.ts index 03ee8e2..4c2e6f9 100644 --- a/src/packages/administrativo/interfaces/TPessoa/TPessoaInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoa/TPessoaInterface.ts @@ -28,4 +28,4 @@ export default interface TPessoaInterface { unidade?: string; numero_end?: string; foto?: string; -} \ No newline at end of file +} diff --git a/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaFormInterface.ts b/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaFormInterface.ts index 8ea81b9..6f80363 100644 --- a/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaFormInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaFormInterface.ts @@ -1,9 +1,9 @@ -import TPessoaJuridicaInterface from "./TPessoaJuridicaInterface"; +import TPessoaJuridicaInterface from './TPessoaJuridicaInterface'; export default interface TPessoaJuridicaFormInterface { - isOpen: boolean; - data: TPessoaJuridicaInterface | null; - onClose: (item: null, isFormStatus: boolean) => void; - onSave: (data: TPessoaJuridicaInterface) => void; - buttonIsLoading: boolean; -} \ No newline at end of file + isOpen: boolean; + data: TPessoaJuridicaInterface | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: TPessoaJuridicaInterface) => void; + buttonIsLoading: boolean; +} diff --git a/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface.ts b/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface.ts index 6ca5fe6..3965a65 100644 --- a/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface.ts @@ -1,12 +1,12 @@ -import TPessoaInterface from "../TPessoaInterface"; +import TPessoaInterface from '../TPessoaInterface'; export default interface TPessoaJuridicaInterface extends TPessoaInterface { - razao_social?: string; - nome_fantasia?: string; - inscricao_estadual?: string; - inscricao_municipal?: string; - capital_social?: number; - data_abertura?: string; - cnae_principal?: string; - cnae_secundario?: string[]; + razao_social?: string; + nome_fantasia?: string; + inscricao_estadual?: string; + inscricao_municipal?: string; + capital_social?: number; + data_abertura?: string; + cnae_principal?: string; + cnae_secundario?: string[]; } diff --git a/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaTableInterface.ts b/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaTableInterface.ts index 1538e35..f823d4c 100644 --- a/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaTableInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaTableInterface.ts @@ -1,7 +1,7 @@ -import TPessoaJuridicaInterface from "./TPessoaJuridicaInterface"; +import TPessoaJuridicaInterface from './TPessoaJuridicaInterface'; export default interface TPessoaJuridicaTableInterface { - data: TPessoaJuridicaInterface[]; - onEdit: (item: TPessoaJuridicaInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TPessoaJuridicaInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data: TPessoaJuridicaInterface[]; + onEdit: (item: TPessoaJuridicaInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TPessoaJuridicaInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface.ts b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface.ts index 045b64d..bae6a9b 100644 --- a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface.ts @@ -1,9 +1,9 @@ export default interface TPessoaRepresentanteInterface { - pessoa_representante_id?: number - pessoa_id?: number - representante_id?: number - ato_partetipo_id?: number - marcacao_tipo_id?: number - assinatura_tipo?: string - pessoa_auxiliar_id?: number -} \ No newline at end of file + pessoa_representante_id?: number; + pessoa_id?: number; + representante_id?: number; + ato_partetipo_id?: number; + marcacao_tipo_id?: number; + assinatura_tipo?: string; + pessoa_auxiliar_id?: number; +} diff --git a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteJoinedInterface.ts b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteJoinedInterface.ts index 83d3227..686822d 100644 --- a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteJoinedInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteJoinedInterface.ts @@ -1,8 +1,8 @@ export default interface TPessoaRepresentanteJoinedInterface { - pessoa_id?: number, - representante_id?: number, - tpj_nome?: string, - tpf_nome?: string, - tpf_email?: string, - tpf_telefon?: string, -} \ No newline at end of file + pessoa_id?: number; + representante_id?: number; + tpj_nome?: string; + tpf_nome?: string; + tpf_email?: string; + tpf_telefon?: string; +} diff --git a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentantePageInterface.ts b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentantePageInterface.ts index 7953d1f..742050e 100644 --- a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentantePageInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentantePageInterface.ts @@ -1,3 +1,3 @@ export default interface TPessoaRepresentantePageInterface { - pessoa_id?: number -} \ No newline at end of file + pessoa_id?: number; +} diff --git a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteTableInterface.ts b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteTableInterface.ts index 916f586..a48166a 100644 --- a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteTableInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentanteTableInterface.ts @@ -1,7 +1,7 @@ -import TPessoaRepresentanteInterface from "./TPessoaRepresentanteInterface"; +import TPessoaRepresentanteInterface from './TPessoaRepresentanteInterface'; export default interface TPessoaRepresentanteTableInterface { - data: TPessoaRepresentanteInterface[]; - onEdit: (item: TPessoaRepresentanteInterface, isEditingFormStatus: boolean) => void; - onDelete: (item: TPessoaRepresentanteInterface, isEditingFormStatus: boolean) => void; -} \ No newline at end of file + data: TPessoaRepresentanteInterface[]; + onEdit: (item: TPessoaRepresentanteInterface, isEditingFormStatus: boolean) => void; + onDelete: (item: TPessoaRepresentanteInterface, isEditingFormStatus: boolean) => void; +} diff --git a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentnateFormInterface.ts b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentnateFormInterface.ts index 336c063..41c4c7b 100644 --- a/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentnateFormInterface.ts +++ b/src/packages/administrativo/interfaces/TPessoaRepresentante/TPessoaRepresentnateFormInterface.ts @@ -1,9 +1,9 @@ -import { TPessoaRepresentanteFormValues } from "../../schemas/TPessoaRepresentante/TPessoaRepresentanteSchema"; +import { TPessoaRepresentanteFormValues } from '../../schemas/TPessoaRepresentante/TPessoaRepresentanteSchema'; export default interface TPessoaRepresentanteFormInterface { - isOpen: boolean; - data: TPessoaRepresentanteFormValues | null; - onClose: (item: null, isFormStatus: boolean) => void; - onSave: (data: TPessoaRepresentanteFormValues) => void; - buttonIsLoading: boolean; + isOpen: boolean; + data: TPessoaRepresentanteFormValues | null; + onClose: (item: null, isFormStatus: boolean) => void; + onSave: (data: TPessoaRepresentanteFormValues) => void; + buttonIsLoading: boolean; } diff --git a/src/packages/administrativo/schemas/GNatureza/GNaturezaSchema.ts b/src/packages/administrativo/schemas/GNatureza/GNaturezaSchema.ts index fd64991..835d3db 100644 --- a/src/packages/administrativo/schemas/GNatureza/GNaturezaSchema.ts +++ b/src/packages/administrativo/schemas/GNatureza/GNaturezaSchema.ts @@ -1,12 +1,12 @@ -import z from "zod"; +import z from 'zod'; export const GNaturezaSchema = z.object({ - natureza_id: z.number().optional(), - descricao: z.string().optional(), - situacao: z.string().optional(), - sistema_id: z.number().optional(), - pedir_numero_imovel: z.string().optional(), - controle_frenteverso: z.string().optional(), + natureza_id: z.number().optional(), + descricao: z.string().optional(), + situacao: z.string().optional(), + sistema_id: z.number().optional(), + pedir_numero_imovel: z.string().optional(), + controle_frenteverso: z.string().optional(), }); -export type GNaturezaFormValues = z.infer; \ No newline at end of file +export type GNaturezaFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TAtoParteTipo/TAtoParteTipoSchema.ts b/src/packages/administrativo/schemas/TAtoParteTipo/TAtoParteTipoSchema.ts index e5abd14..290015a 100644 --- a/src/packages/administrativo/schemas/TAtoParteTipo/TAtoParteTipoSchema.ts +++ b/src/packages/administrativo/schemas/TAtoParteTipo/TAtoParteTipoSchema.ts @@ -1,15 +1,15 @@ -import z from "zod"; +import z from 'zod'; export const TAtoParteTipoSchema = z.object({ - ato_partetipo_id: z.number().optional(), - descricao: z.string().optional(), - tipo_parte: z.number().optional(), - auto_qualifica: z.string().optional(), - declara_doi: z.string().optional(), - possui_documento_ext: z.string().optional(), - situacao: z.string().optional(), - texto: z.string().optional(), - censec_qualidade_id: z.number().optional(), + ato_partetipo_id: z.number().optional(), + descricao: z.string().optional(), + tipo_parte: z.number().optional(), + auto_qualifica: z.string().optional(), + declara_doi: z.string().optional(), + possui_documento_ext: z.string().optional(), + situacao: z.string().optional(), + texto: z.string().optional(), + censec_qualidade_id: z.number().optional(), }); -export type TAtoParteTipoFormValues = z.infer; \ No newline at end of file +export type TAtoParteTipoFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts b/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts index 2c426be..257dadc 100644 --- a/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts +++ b/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts @@ -1,12 +1,12 @@ -import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; -import z from "zod"; +import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import z from 'zod'; export const TCensecQualidadeSchema = z.object({ - censec_qualidade_id: z.number().optional(), - descricao: z.string().optional(), - situacao: z.enum(SituacoesEnum).optional(), - aceita_cnpj: z.enum(ConfirmacaoEnum).optional(), + censec_qualidade_id: z.number().optional(), + descricao: z.string().optional(), + situacao: z.enum(SituacoesEnum).optional(), + aceita_cnpj: z.enum(ConfirmacaoEnum).optional(), }); -export type TCensecQualidadeFormValues = z.infer; \ No newline at end of file +export type TCensecQualidadeFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema.ts b/src/packages/administrativo/schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema.ts index be1ccff..52a27aa 100644 --- a/src/packages/administrativo/schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema.ts +++ b/src/packages/administrativo/schemas/TCensecQualidadeAto/TCensecQualidadeAtoSchema.ts @@ -1,10 +1,10 @@ -import z from "zod"; +import z from 'zod'; export const TCensecQualidadeAtoSchema = z.object({ - censec_qualidadeato_id: z.number().optional(), - censec_tipoato_id: z.number().optional(), - censec_qualidade_id: z.number().optional(), - qtd_minima: z.number().optional(), + censec_qualidadeato_id: z.number().optional(), + censec_tipoato_id: z.number().optional(), + censec_qualidade_id: z.number().optional(), + qtd_minima: z.number().optional(), }); -export type TCensecQualidadeAtoFormValues = z.infer; \ No newline at end of file +export type TCensecQualidadeAtoFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts b/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts index c713f00..ce31cfe 100644 --- a/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts +++ b/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts @@ -1,12 +1,12 @@ -import { z } from "zod"; -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import { z } from 'zod'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; export const TCensecTipoAtoSchema = z.object({ censec_tipoato_id: z.number().int(), - censec_id: z.number("Precisa referir a qual Central do Censec pertence").int(), + censec_id: z.number('Precisa referir a qual Central do Censec pertence').int(), codigo: z.number().int().nullable(), - descricao: z.string().min(1, "Campo descrição deve ser preenchido"), - situacao: z.enum(SituacoesEnum, { message: "Tipo inválido" }), - tipo_separacao: z.enum(["S", "N"]).nullable(), - tipo_revogacao: z.enum(["S", "N"]).nullable(), -}); \ No newline at end of file + descricao: z.string().min(1, 'Campo descrição deve ser preenchido'), + situacao: z.enum(SituacoesEnum, { message: 'Tipo inválido' }), + tipo_separacao: z.enum(['S', 'N']).nullable(), + tipo_revogacao: z.enum(['S', 'N']).nullable(), +}); diff --git a/src/packages/administrativo/schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema.ts b/src/packages/administrativo/schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema.ts index 13ce350..574e8f3 100644 --- a/src/packages/administrativo/schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema.ts +++ b/src/packages/administrativo/schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema.ts @@ -1,14 +1,14 @@ -import z from "zod"; +import z from 'zod'; export const TCensecTipoNaturezaSchema = z.object({ - censec_tiponatureza_id: z.number().optional(), - censec_tipoato_id: z.number().optional(), - descricao: z.string().optional(), - possui_ato_anterior: z.string().optional(), - codigo: z.number().optional(), - obrigatorio: z.string().optional(), - tipo_ato_anterior: z.string().optional(), - situacao_ato_anterior: z.string().optional(), + censec_tiponatureza_id: z.number().optional(), + censec_tipoato_id: z.number().optional(), + descricao: z.string().optional(), + possui_ato_anterior: z.string().optional(), + codigo: z.number().optional(), + obrigatorio: z.string().optional(), + tipo_ato_anterior: z.string().optional(), + situacao_ato_anterior: z.string().optional(), }); -export type TCensecTipoNaturezaFormValues = z.infer; \ No newline at end of file +export type TCensecTipoNaturezaFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TImovel/TImovelSchema.ts b/src/packages/administrativo/schemas/TImovel/TImovelSchema.ts index c793045..f3c8c2b 100644 --- a/src/packages/administrativo/schemas/TImovel/TImovelSchema.ts +++ b/src/packages/administrativo/schemas/TImovel/TImovelSchema.ts @@ -1,20 +1,20 @@ -import z from "zod"; +import z from 'zod'; export const TImovelSchema = z.object({ - imovel_id: z.number().optional(), - tipo_classe: z.number().optional(), - tipo_registro: z.string().optional(), - data_registro: z.string().optional(), - numero: z.number().optional(), - numero_letra: z.string().optional(), - cidade: z.string().optional(), - cep: z.string().optional(), - uf: z.string().optional(), - tb_bairro_id: z.number().optional(), - cartorio: z.number().optional(), - livro: z.string().optional(), - cns: z.number().optional(), - gtbb_descricao: z.string().optional(), + imovel_id: z.number().optional(), + tipo_classe: z.number().optional(), + tipo_registro: z.string().optional(), + data_registro: z.string().optional(), + numero: z.number().optional(), + numero_letra: z.string().optional(), + cidade: z.string().optional(), + cep: z.string().optional(), + uf: z.string().optional(), + tb_bairro_id: z.number().optional(), + cartorio: z.number().optional(), + livro: z.string().optional(), + cns: z.number().optional(), + gtbb_descricao: z.string().optional(), }); -export type TImovelFormValues = z.infer; \ No newline at end of file +export type TImovelFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema.ts b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema.ts index a035e7f..faece55 100644 --- a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema.ts +++ b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema.ts @@ -1,16 +1,16 @@ -import { z } from "zod"; -import { TImovelUnidadeSchema } from "../TImovelUnidadeSchema"; -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; +import { z } from 'zod'; +import { TImovelUnidadeSchema } from '../TImovelUnidadeSchema'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; export const TImovelUnidadeRuralSchema = TImovelUnidadeSchema.extend({ - galpao: z.string().optional(), - nao_se_aplica: z.boolean().optional(), - reserva_florestal: z.enum(SituacoesEnum).optional(), - geo_referenciamento: z.enum(SituacoesEnum).optional(), - nome_identificacao: z.string().optional(), - ccir: z.string().optional(), - denominacao: z.string().optional(), - nirf: z.string().optional(), + galpao: z.string().optional(), + nao_se_aplica: z.boolean().optional(), + reserva_florestal: z.enum(SituacoesEnum).optional(), + geo_referenciamento: z.enum(SituacoesEnum).optional(), + nome_identificacao: z.string().optional(), + ccir: z.string().optional(), + denominacao: z.string().optional(), + nirf: z.string().optional(), }); export type TImovelUnidadeRuralFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeSchema.ts b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeSchema.ts index 5886081..0463c11 100644 --- a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeSchema.ts +++ b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeSchema.ts @@ -1,12 +1,12 @@ -import { z } from "zod"; +import { z } from 'zod'; export const TImovelUnidadeSchema = z.object({ - imovel_unidade_id: z.number().optional(), - imovel_id: z.number().optional(), - area: z.number().optional(), - area_descritiva: z.string().optional(), - tipo_imovel: z.number().optional(), - tipo_construcao: z.number().optional(), + imovel_unidade_id: z.number().optional(), + imovel_id: z.number().optional(), + area: z.number().optional(), + area_descritiva: z.string().optional(), + tipo_imovel: z.number().optional(), + tipo_construcao: z.number().optional(), }); -export type TImovelUnidadeBaseFormValues = z.infer; \ No newline at end of file +export type TImovelUnidadeBaseFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema.ts b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema.ts index 84cb90d..11b1d32 100644 --- a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema.ts +++ b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema.ts @@ -1,22 +1,22 @@ -import { z } from "zod"; -import { TImovelUnidadeSchema } from "../TImovelUnidadeSchema"; +import { z } from 'zod'; +import { TImovelUnidadeSchema } from '../TImovelUnidadeSchema'; export const TImovelUnidadeUrbanoSchema = TImovelUnidadeSchema.extend({ - quadra: z.string().optional(), - lote: z.string().optional(), - inscricao_municipal: z.string().optional(), - tb_tipologradouro_id: z.number().optional(), - logradouro: z.string().optional(), - iptu: z.string().optional(), - numero_unidade: z.string().optional(), - torre: z.string().optional(), - nomecondominio: z.string().optional(), - nomeloteamento: z.string().optional(), - numero: z.string().optional(), - complemento: z.string().optional(), - numero_edificacao: z.string().optional(), - cnm_numero: z.string().optional(), - cib: z.string().optional(), + quadra: z.string().optional(), + lote: z.string().optional(), + inscricao_municipal: z.string().optional(), + tb_tipologradouro_id: z.number().optional(), + logradouro: z.string().optional(), + iptu: z.string().optional(), + numero_unidade: z.string().optional(), + torre: z.string().optional(), + nomecondominio: z.string().optional(), + nomeloteamento: z.string().optional(), + numero: z.string().optional(), + complemento: z.string().optional(), + numero_edificacao: z.string().optional(), + cnm_numero: z.string().optional(), + cib: z.string().optional(), }); export type TImovelUnidadeUrbanoFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema.ts b/src/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema.ts index 936da5b..96ac7aa 100644 --- a/src/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema.ts +++ b/src/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema.ts @@ -1,5 +1,5 @@ -import { TPessoaSchema } from "./TPessoaSchema"; -import z from "zod"; +import { TPessoaSchema } from './TPessoaSchema'; +import z from 'zod'; export const TPessoaFisicaSchema = TPessoaSchema.extend({ nacionalidade: z.string().optional(), diff --git a/src/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema.ts b/src/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema.ts index 5e58768..4c10a23 100644 --- a/src/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema.ts +++ b/src/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema.ts @@ -1,15 +1,15 @@ -import { TPessoaSchema } from "./TPessoaSchema"; -import z from "zod"; +import { TPessoaSchema } from './TPessoaSchema'; +import z from 'zod'; export const TPessoaJuridicaSchema = TPessoaSchema.extend({ - razao_social: z.string().optional(), - nome_fantasia: z.string().optional(), - inscricao_estadual: z.string().optional(), - inscricao_municipal: z.string().optional(), - capital_social: z.number().optional(), - data_abertura: z.string().optional(), - cnae_principal: z.string().optional(), - cnae_secundario: z.array(z.string()).optional(), + razao_social: z.string().optional(), + nome_fantasia: z.string().optional(), + inscricao_estadual: z.string().optional(), + inscricao_municipal: z.string().optional(), + capital_social: z.number().optional(), + data_abertura: z.string().optional(), + cnae_principal: z.string().optional(), + cnae_secundario: z.array(z.string()).optional(), }); -export type TPessoaJuridicaFormValues = z.infer; \ No newline at end of file +export type TPessoaJuridicaFormValues = z.infer; diff --git a/src/packages/administrativo/schemas/TPessoaRepresentante/TPessoaRepresentanteSchema.ts b/src/packages/administrativo/schemas/TPessoaRepresentante/TPessoaRepresentanteSchema.ts index bcf7e01..a7dc409 100644 --- a/src/packages/administrativo/schemas/TPessoaRepresentante/TPessoaRepresentanteSchema.ts +++ b/src/packages/administrativo/schemas/TPessoaRepresentante/TPessoaRepresentanteSchema.ts @@ -10,4 +10,4 @@ export const TPessoaRepresentanteSchema = z.object({ pessoa_auxiliar_id: z.number().optional(), }); -export type TPessoaRepresentanteFormValues = z.infer; \ No newline at end of file +export type TPessoaRepresentanteFormValues = z.infer; diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts index cd2735e..aafc8cf 100644 --- a/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts +++ b/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { GNaturezaDeleteData } from "../../data/GNatureza/GNaturezaDeleteData"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { GNaturezaDeleteData } from '../../data/GNatureza/GNaturezaDeleteData'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; async function executeGNaturezaDeleteService(data: GNaturezaInterface) { const response = await GNaturezaDeleteData(data); diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts index c1b1ff3..b6fb881 100644 --- a/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts +++ b/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { GNaturezaIndexData } from "../../data/GNatureza/GNaturezaIndexData"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { GNaturezaIndexData } from '../../data/GNatureza/GNaturezaIndexData'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; export default async function executeGNaturezaIndexService(data: GNaturezaInterface) { const response = await GNaturezaIndexData(data); @@ -8,4 +8,4 @@ export default async function executeGNaturezaIndexService(data: GNaturezaInterf return response; } -export const GNaturezaIndexService = withClientErrorHandler(executeGNaturezaIndexService); \ No newline at end of file +export const GNaturezaIndexService = withClientErrorHandler(executeGNaturezaIndexService); diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts index d9f9db0..6555e59 100644 --- a/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts +++ b/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { GNaturezaSaveData } from "../../data/GNatureza/GNaturezaSaveData"; -import GNaturezaInterface from "../../interfaces/GNatureza/GNaturezaInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { GNaturezaSaveData } from '../../data/GNatureza/GNaturezaSaveData'; +import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; async function executeGNaturezaSaveService(data: GNaturezaInterface) { const response = await GNaturezaSaveData(data); @@ -8,4 +8,4 @@ async function executeGNaturezaSaveService(data: GNaturezaInterface) { return response; } -export const GNaturezaSaveService = withClientErrorHandler(executeGNaturezaSaveService); \ No newline at end of file +export const GNaturezaSaveService = withClientErrorHandler(executeGNaturezaSaveService); diff --git a/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts index 28668d6..df48dc2 100644 --- a/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts +++ b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts @@ -6,4 +6,4 @@ async function executeGTBEstadoCivilIndexService() { return response; } -export const GTBEstadoCivilIndexService = withClientErrorHandler(executeGTBEstadoCivilIndexService); \ No newline at end of file +export const GTBEstadoCivilIndexService = withClientErrorHandler(executeGTBEstadoCivilIndexService); diff --git a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts index 669f227..f83054f 100644 --- a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts +++ b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts @@ -8,4 +8,4 @@ async function executeTAtoParteTipoSaveService(data: TAtoParteTipoInterface) { return response; } -export const TAtoParteTipoSaveService = withClientErrorHandler(executeTAtoParteTipoSaveService); \ No newline at end of file +export const TAtoParteTipoSaveService = withClientErrorHandler(executeTAtoParteTipoSaveService); diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts index ea9b831..ca27b9d 100644 --- a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts @@ -8,4 +8,6 @@ async function executeTCensecQualidadeDeleteService(data: TCensecQualidadeInterf return response; } -export const TCensecQualidadeDeleteService = withClientErrorHandler(executeTCensecQualidadeDeleteService); +export const TCensecQualidadeDeleteService = withClientErrorHandler( + executeTCensecQualidadeDeleteService, +); diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts index eb37b0f..5fca667 100644 --- a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts @@ -7,4 +7,6 @@ export default async function executeTCensecQualidadeIndexService() { return response; } -export const TCensecQualidadeIndexService = withClientErrorHandler(executeTCensecQualidadeIndexService); +export const TCensecQualidadeIndexService = withClientErrorHandler( + executeTCensecQualidadeIndexService, +); diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts index a667df9..ac62c0e 100644 --- a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts @@ -7,4 +7,6 @@ async function executeTCensecQualidadeSaveService(data: TCensecQualidadeInterfac return response; } -export const TCensecQualidadeSaveService = withClientErrorHandler(executeTCensecQualidadeSaveService); \ No newline at end of file +export const TCensecQualidadeSaveService = withClientErrorHandler( + executeTCensecQualidadeSaveService, +); diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts index e78265e..7694fd5 100644 --- a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts @@ -7,5 +7,5 @@ async function executeTCensecQualidadeAtoIndexService(data: TCensecQualidadeAtoI } export const TCensecQualidadeAtoIndexService = withClientErrorHandler( - executeTCensecQualidadeAtoIndexService -); \ No newline at end of file + executeTCensecQualidadeAtoIndexService, +); diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts index 1c2cad2..64e1c7b 100644 --- a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts @@ -9,5 +9,5 @@ async function executeTCensecQualidadeAtoRemoveService(data: TCensecQualidadeAto } export const TCensecQualidadeAtoRemoveService = withClientErrorHandler( - executeTCensecQualidadeAtoRemoveService + executeTCensecQualidadeAtoRemoveService, ); diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts index 266db27..ae6fcab 100644 --- a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts @@ -8,5 +8,5 @@ async function executeTCensecQualidadeAtoSaveService(data: TCensecQualidadeAtoIn } export const TCensecQualidadeAtoSaveService = withClientErrorHandler( - executeTCensecQualidadeAtoSaveService + executeTCensecQualidadeAtoSaveService, ); diff --git a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts index ed4e4f0..071c0c1 100644 --- a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts @@ -1,10 +1,9 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TCensecTipoAtoIndexData } from "../../data/TCensecTipoAto/GMedidaTipoIndexData"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TCensecTipoAtoIndexData } from '../../data/TCensecTipoAto/GMedidaTipoIndexData'; async function executeTCensecTipoAtoIndexService() { - - const response = await TCensecTipoAtoIndexData(); - return response; + const response = await TCensecTipoAtoIndexData(); + return response; } -export const TCensecTipoAtoIndexService = withClientErrorHandler(executeTCensecTipoAtoIndexService) \ No newline at end of file +export const TCensecTipoAtoIndexService = withClientErrorHandler(executeTCensecTipoAtoIndexService); diff --git a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts index 0a6b4e1..d59dda1 100644 --- a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts @@ -1,13 +1,13 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TCensecTipoAtoRemoveData } from "../../data/TCensecTipoAto/GMedidaTipoRemoveData"; -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TCensecTipoAtoRemoveData } from '../../data/TCensecTipoAto/GMedidaTipoRemoveData'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; async function executeTCensecTipoAtoRemoveService(data: TCensecTipoAtoInterface) { + const response = await TCensecTipoAtoRemoveData(data); - const response = await TCensecTipoAtoRemoveData(data); - - return response; - + return response; } -export const TCensecTipoAtoRemoveService = withClientErrorHandler(executeTCensecTipoAtoRemoveService) \ No newline at end of file +export const TCensecTipoAtoRemoveService = withClientErrorHandler( + executeTCensecTipoAtoRemoveService, +); diff --git a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts index da56012..65fd928 100644 --- a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts @@ -1,13 +1,11 @@ -import { withClientErrorHandler } from "@/shared/actions/withClientErrorHandler/withClientErrorHandler"; -import { TCensecTipoAtoSaveData } from "../../data/TCensecTipoAto/GMedidaTipoSaveData"; -import { TCensecTipoAtoInterface } from "../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface"; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import { TCensecTipoAtoSaveData } from '../../data/TCensecTipoAto/GMedidaTipoSaveData'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; async function executeTCensecTipoAtoSaveService(data: TCensecTipoAtoInterface) { + const response = await TCensecTipoAtoSaveData(data); - const response = await TCensecTipoAtoSaveData(data); - - return response; - + return response; } -export const TCensecTipoAtoSaveService = withClientErrorHandler(executeTCensecTipoAtoSaveService) \ No newline at end of file +export const TCensecTipoAtoSaveService = withClientErrorHandler(executeTCensecTipoAtoSaveService); diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts index 52e3665..b79178b 100644 --- a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts @@ -8,4 +8,6 @@ async function executeTCensecTipoNaturezaDeleteService(data: TCensecTipoNatureza return response; } -export const TCensecTipoNaturezaDeleteService = withClientErrorHandler(executeTCensecTipoNaturezaDeleteService); +export const TCensecTipoNaturezaDeleteService = withClientErrorHandler( + executeTCensecTipoNaturezaDeleteService, +); diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts index 1a4ce87..01a56c3 100644 --- a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts @@ -6,4 +6,6 @@ export default async function executeTCensecTipoNaturezaIndexService() { return response; } -export const TCensecTipoNaturezaIndexService = withClientErrorHandler(executeTCensecTipoNaturezaIndexService); +export const TCensecTipoNaturezaIndexService = withClientErrorHandler( + executeTCensecTipoNaturezaIndexService, +); diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts index 02689f1..368adc5 100644 --- a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts @@ -8,4 +8,6 @@ async function executeTCensecTipoNaturezaSaveService(data: TCensecTipoNaturezaIn return response; } -export const TCensecTipoNaturezaSaveService = withClientErrorHandler(executeTCensecTipoNaturezaSaveService); \ No newline at end of file +export const TCensecTipoNaturezaSaveService = withClientErrorHandler( + executeTCensecTipoNaturezaSaveService, +); diff --git a/src/packages/administrativo/services/TImovel/TImovelSaveService.ts b/src/packages/administrativo/services/TImovel/TImovelSaveService.ts index aefd488..746d2a3 100644 --- a/src/packages/administrativo/services/TImovel/TImovelSaveService.ts +++ b/src/packages/administrativo/services/TImovel/TImovelSaveService.ts @@ -8,4 +8,4 @@ async function executeTImovelSaveService(data: TImovelInterface) { return response; } -export const TImovelSaveService = withClientErrorHandler(executeTImovelSaveService); \ No newline at end of file +export const TImovelSaveService = withClientErrorHandler(executeTImovelSaveService); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService.ts index 01e5ac4..296a3cc 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService.ts @@ -8,4 +8,6 @@ async function executeTImovelUnidadeRuralDeleteService(data: TImovelUnidadeRural return response; } -export const TImovelUnidadeRuralDeleteService = withClientErrorHandler(executeTImovelUnidadeRuralDeleteService); +export const TImovelUnidadeRuralDeleteService = withClientErrorHandler( + executeTImovelUnidadeRuralDeleteService, +); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService.ts index f5b320c..eade373 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService.ts @@ -2,12 +2,16 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/ import { TImovelUnidadeRuralIndexData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData'; import TImovelUnidadeInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeInterface'; -export default async function executeTImovelUnidadeRuralIndexService(data: TImovelUnidadeInterface) { - let response = null +export default async function executeTImovelUnidadeRuralIndexService( + data: TImovelUnidadeInterface, +) { + let response = null; if (data.imovel_id) { response = await TImovelUnidadeRuralIndexData(data); return response; } } -export const TImovelUnidadeRuralIndexService = withClientErrorHandler(executeTImovelUnidadeRuralIndexService); +export const TImovelUnidadeRuralIndexService = withClientErrorHandler( + executeTImovelUnidadeRuralIndexService, +); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService.ts index b8e3413..e2c74cb 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService.ts @@ -7,4 +7,6 @@ async function executeTImovelUnidadeRuralSaveService(data: TImovelUnidadeRuralIn return response; } -export const TImovelUnidadeRuralSaveService = withClientErrorHandler(executeTImovelUnidadeRuralSaveService); \ No newline at end of file +export const TImovelUnidadeRuralSaveService = withClientErrorHandler( + executeTImovelUnidadeRuralSaveService, +); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService.ts index c9b6c99..66e6d18 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService.ts @@ -3,10 +3,11 @@ import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfa import { TImovelUnidadeUrbanoDeleteData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData'; async function executeTImovelUnidadeUrbanoDeleteService(data: TImovelUnidadeUrbanoInterface) { - const response = await TImovelUnidadeUrbanoDeleteData(data); return response; } -export const TImovelUnidadeUrbanoDeleteService = withClientErrorHandler(executeTImovelUnidadeUrbanoDeleteService); +export const TImovelUnidadeUrbanoDeleteService = withClientErrorHandler( + executeTImovelUnidadeUrbanoDeleteService, +); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService.ts index 8af64fe..738e9eb 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService.ts @@ -2,7 +2,9 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/ import { TImovelUnidadeUrbanoIndexData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData'; import TImovelUnidadePageInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface'; -export default async function executeTImovelUnidadeUrbanoIndexService(data: TImovelUnidadePageInterface) { +export default async function executeTImovelUnidadeUrbanoIndexService( + data: TImovelUnidadePageInterface, +) { if (!data.imovel_id) { return { status: 1000, @@ -12,4 +14,6 @@ export default async function executeTImovelUnidadeUrbanoIndexService(data: TImo return await TImovelUnidadeUrbanoIndexData(data); } -export const TImovelUnidadeUrbanoIndexService = withClientErrorHandler(executeTImovelUnidadeUrbanoIndexService); \ No newline at end of file +export const TImovelUnidadeUrbanoIndexService = withClientErrorHandler( + executeTImovelUnidadeUrbanoIndexService, +); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService.ts index fe14792..415eea6 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService.ts @@ -8,4 +8,6 @@ async function executeTImovelUnidadeUrbanoSaveService(data: TImovelUnidadeUrbano return response; } -export const TImovelUnidadeUrbanoSaveService = withClientErrorHandler(executeTImovelUnidadeUrbanoSaveService); \ No newline at end of file +export const TImovelUnidadeUrbanoSaveService = withClientErrorHandler( + executeTImovelUnidadeUrbanoSaveService, +); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService.ts b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService.ts index 2c043b4..e9369a9 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService.ts @@ -6,6 +6,4 @@ async function executeTPessoaFisicaIndexService() { return response; } -export const TPessoaFisicaIndexService = withClientErrorHandler( - executeTPessoaFisicaIndexService -); +export const TPessoaFisicaIndexService = withClientErrorHandler(executeTPessoaFisicaIndexService); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService.ts b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService.ts index 10fcdd1..6e0d4f4 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService.ts @@ -8,6 +8,4 @@ async function executeTPessoaFisicaRemoveService(data: TPessoaFisicaInterface) { return response; } -export const TPessoaFisicaRemoveService = withClientErrorHandler( - executeTPessoaFisicaRemoveService -); +export const TPessoaFisicaRemoveService = withClientErrorHandler(executeTPessoaFisicaRemoveService); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService.ts b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService.ts index 9fb7272..1f0aa91 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService.ts @@ -3,7 +3,6 @@ import { TPessoaFisicaSaveData } from '@/packages/administrativo/data/TPessoa/TP import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; async function executeTPessoaFisicaSaveService(data: TPessoaFisicaInterface) { - console.log('TPessoaFisicaSaveService', data); const response = await TPessoaFisicaSaveData(data); @@ -11,6 +10,4 @@ async function executeTPessoaFisicaSaveService(data: TPessoaFisicaInterface) { return response; } -export const TPessoaFisicaSaveService = withClientErrorHandler( - executeTPessoaFisicaSaveService -); +export const TPessoaFisicaSaveService = withClientErrorHandler(executeTPessoaFisicaSaveService); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService.ts b/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService.ts index f5c472c..e6f4f52 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService.ts @@ -6,6 +6,4 @@ async function executeTPessoaJuridicaSaveService(data: TPessoaJuridicaInterface) const response = TPessoaJuridicaSaveData(data); return response; } -export const TPessoaJuridicaSaveService = withClientErrorHandler( - executeTPessoaJuridicaSaveService, -); +export const TPessoaJuridicaSaveService = withClientErrorHandler(executeTPessoaJuridicaSaveService); diff --git a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteIndexService.ts b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteIndexService.ts index 81a9b72..dd69bf9 100644 --- a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteIndexService.ts +++ b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteIndexService.ts @@ -8,5 +8,5 @@ async function executeTPessoaRepresentanteIndexService(data: TPessoaRepresentant } export const TPessoaRepresentanteIndexService = withClientErrorHandler( - executeTPessoaRepresentanteIndexService -); \ No newline at end of file + executeTPessoaRepresentanteIndexService, +); diff --git a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteRemoveService.ts b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteRemoveService.ts index 7937d19..fd0737c 100644 --- a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteRemoveService.ts +++ b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteRemoveService.ts @@ -9,5 +9,5 @@ async function executeTPessoaRepresentanteRemoveService(data: TPessoaRepresentan } export const TPessoaRepresentanteRemoveService = withClientErrorHandler( - executeTPessoaRepresentanteRemoveService + executeTPessoaRepresentanteRemoveService, ); diff --git a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteSaveService.ts b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteSaveService.ts index 9b722c3..033e037 100644 --- a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteSaveService.ts +++ b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteSaveService.ts @@ -8,5 +8,5 @@ async function executeTPessoaRepresentanteSaveService(data: TPessoaRepresentante } export const TPessoaRepresentanteSaveService = withClientErrorHandler( - executeTPessoaRepresentanteSaveService + executeTPessoaRepresentanteSaveService, ); diff --git a/src/shared/actions/CEP/FormatCEP.ts b/src/shared/actions/CEP/FormatCEP.ts index 410452a..a8a7cc5 100644 --- a/src/shared/actions/CEP/FormatCEP.ts +++ b/src/shared/actions/CEP/FormatCEP.ts @@ -5,16 +5,16 @@ * @returns CEP formatado ou string vazia se inválido */ export function FormatCEP(value: string | number): string { - if (!value) return ''; + if (!value) return ''; - // Converte para string e remove tudo que não seja número - const digits = String(value).replace(/\D/g, ''); + // Converte para string e remove tudo que não seja número + const digits = String(value).replace(/\D/g, ''); - // Garante que tenha no máximo 8 dígitos - const cleanValue = digits.slice(0, 8); + // Garante que tenha no máximo 8 dígitos + const cleanValue = digits.slice(0, 8); - // Retorna formatado ou valor limpo se não tiver tamanho suficiente - if (cleanValue.length !== 8) return cleanValue; + // Retorna formatado ou valor limpo se não tiver tamanho suficiente + if (cleanValue.length !== 8) return cleanValue; - return cleanValue.replace(/(\d{5})(\d{3})/, '$1-$2'); + return cleanValue.replace(/(\d{5})(\d{3})/, '$1-$2'); } diff --git a/src/shared/actions/form/ResetFormIfData.ts b/src/shared/actions/form/ResetFormIfData.ts index ad60c31..48093ee 100644 --- a/src/shared/actions/form/ResetFormIfData.ts +++ b/src/shared/actions/form/ResetFormIfData.ts @@ -1,5 +1,5 @@ -import { UseFormReturn, FieldValues } from "react-hook-form"; -import normalizeFormData from "./normalizeFormData"; +import { UseFormReturn, FieldValues } from 'react-hook-form'; +import normalizeFormData from './normalizeFormData'; /** * Reseta o formulário apenas se os dados recebidos forem diferentes @@ -8,20 +8,16 @@ import normalizeFormData from "./normalizeFormData"; * @param form - Instância do react-hook-form * @param data - Dados para popular o formulário */ -export function ResetFormIfData( - form: UseFormReturn, - data: T | null -) { - if (!data) return; +export function ResetFormIfData(form: UseFormReturn, data: T | null) { + if (!data) return; - const normalized = normalizeFormData(data); - const currentValues = form.getValues(); + const normalized = normalizeFormData(data); + const currentValues = form.getValues(); - // Converte ambos em JSON para comparação rasa de estrutura - const isDifferent = - JSON.stringify(currentValues) !== JSON.stringify(normalized); + // Converte ambos em JSON para comparação rasa de estrutura + const isDifferent = JSON.stringify(currentValues) !== JSON.stringify(normalized); - if (isDifferent) { - form.reset(normalized); - } -} \ No newline at end of file + if (isDifferent) { + form.reset(normalized); + } +} diff --git a/src/shared/actions/form/normalizeFormData.ts b/src/shared/actions/form/normalizeFormData.ts index d2a3dfe..b6dcdc3 100644 --- a/src/shared/actions/form/normalizeFormData.ts +++ b/src/shared/actions/form/normalizeFormData.ts @@ -5,15 +5,14 @@ * Boolean: false */ export default function normalizeFormData>(data: T): T { - const normalized: Record = {}; - for (const key in data) { - if (data[key] === null || data[key] === undefined) { - // Detecta tipo baseado em chave ou regra padrão - normalized[key] = - typeof data[key] === 'number' ? 0 : ''; - } else { - normalized[key] = data[key]; - } + const normalized: Record = {}; + for (const key in data) { + if (data[key] === null || data[key] === undefined) { + // Detecta tipo baseado em chave ou regra padrão + normalized[key] = typeof data[key] === 'number' ? 0 : ''; + } else { + normalized[key] = data[key]; } - return normalized as T; -} \ No newline at end of file + } + return normalized as T; +} diff --git a/src/shared/components/confirmacao/ConfirmacaoSelect.tsx b/src/shared/components/confirmacao/ConfirmacaoSelect.tsx index 8ebbdc5..468656a 100644 --- a/src/shared/components/confirmacao/ConfirmacaoSelect.tsx +++ b/src/shared/components/confirmacao/ConfirmacaoSelect.tsx @@ -1,61 +1,72 @@ -import { Button } from "@/components/ui/button"; -import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { ConfirmacaoEnum } from "@/shared/enums/ConfirmacaoEnum"; -import { Command } from "cmdk"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import React from "react"; +import { Button } from '@/components/ui/button'; +import { + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; export default function ConfirmacaoSelect({ field }: any) { - const [open, setOpen] = React.useState(false); + const [open, setOpen] = React.useState(false); - const options = Object.entries(ConfirmacaoEnum).map(([value, label]) => ({ - value, - label, - })); + const options = Object.entries(ConfirmacaoEnum).map(([value, label]) => ({ + value, + label, + })); - return ( - - - - - - - - - - - Nenhum resultado encontrado. - - {options.map((item) => ( - { - field.onChange(item.value); - setOpen(false); - }} - > - - {item.label} - - ))} - - - - - - ); + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); } diff --git a/src/shared/components/dataTable/DataTable.tsx b/src/shared/components/dataTable/DataTable.tsx index 7be7f45..202a080 100644 --- a/src/shared/components/dataTable/DataTable.tsx +++ b/src/shared/components/dataTable/DataTable.tsx @@ -31,11 +31,7 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { - ChevronLeftIcon, - ChevronRightIcon, - EyeIcon, -} from 'lucide-react'; +import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from 'lucide-react'; import DataTableInterface from './interfaces/DataTableInterface'; export function DataTable({ @@ -63,33 +59,25 @@ export function DataTable({ ...columns, ...(onEdit || onDelete ? [ - { - id: 'actions', - header: 'Ações', - cell: ({ row }: any) => ( -
- {onEdit && ( - - )} - {onDelete && ( - - )} -
- ), - } as ColumnDef, - ] + { + id: 'actions', + header: 'Ações', + cell: ({ row }: any) => ( +
+ {onEdit && ( + + )} + {onDelete && ( + + )} +
+ ), + } as ColumnDef, + ] : []), ], state: { @@ -116,9 +104,7 @@ export function DataTable({ - table.getColumn(filterColumn)?.setFilterValue(e.target.value) - } + onChange={(e) => table.getColumn(filterColumn)?.setFilterValue(e.target.value)} className="w-full" /> )} @@ -167,7 +153,7 @@ export function DataTable({ table.getRowModel().rows.map((row) => ( onRowClick?.(row.original)} > {row.getVisibleCells().map((cell) => ( @@ -179,10 +165,7 @@ export function DataTable({ )) ) : ( - + Nenhum resultado encontrado. @@ -192,7 +175,7 @@ export function DataTable({
{/* Paginação */}
- + Página {table.getState().pagination.pageIndex + 1} de {table.getPageCount()}
@@ -202,8 +185,8 @@ export function DataTable({ onClick={() => table.setPageIndex(0)} disabled={!table.getCanPreviousPage()} aria-label="Primeira página" - className='cursor-pointer' - type='button' + className="cursor-pointer" + type="button" > Primeira @@ -213,8 +196,8 @@ export function DataTable({ onClick={() => table.previousPage()} disabled={!table.getCanPreviousPage()} aria-label="Página anterior" - className='cursor-pointer' - type='button' + className="cursor-pointer" + type="button" > Anterior @@ -225,8 +208,8 @@ export function DataTable({ onClick={() => table.nextPage()} disabled={!table.getCanNextPage()} aria-label="Próxima página" - className='cursor-pointer' - type='button' + className="cursor-pointer" + type="button" > Próxima @@ -237,8 +220,8 @@ export function DataTable({ onClick={() => table.setPageIndex(table.getPageCount() - 1)} disabled={!table.getCanNextPage()} aria-label="Última página" - className='cursor-pointer' - type='button' + className="cursor-pointer" + type="button" > Última diff --git a/src/shared/components/dataTable/SortableHeader.tsx b/src/shared/components/dataTable/SortableHeader.tsx index 29cde35..4b30726 100644 --- a/src/shared/components/dataTable/SortableHeader.tsx +++ b/src/shared/components/dataTable/SortableHeader.tsx @@ -1,12 +1,9 @@ -import { Button } from "@/components/ui/button"; -import { ArrowUpDownIcon } from "lucide-react"; +import { Button } from '@/components/ui/button'; +import { ArrowUpDownIcon } from 'lucide-react'; export const SortableHeader = (label: string, column: any) => ( - -); \ No newline at end of file + +); diff --git a/src/shared/components/dataTable/interfaces/DataTableInterface.ts b/src/shared/components/dataTable/interfaces/DataTableInterface.ts index 5e51a64..bfa94bf 100644 --- a/src/shared/components/dataTable/interfaces/DataTableInterface.ts +++ b/src/shared/components/dataTable/interfaces/DataTableInterface.ts @@ -1,12 +1,12 @@ -import { ColumnDef } from "@tanstack/react-table"; +import { ColumnDef } from '@tanstack/react-table'; // Tipagem genérica export default interface DataTableInterface { - data?: TData[] | null; - columns: ColumnDef[]; - filterColumn?: string; - filterPlaceholder?: string; - onEdit?: (item: TData) => void; - onDelete?: (item: TData) => void; - onRowClick?: (item: TData) => void; -} \ No newline at end of file + data?: TData[] | null; + columns: ColumnDef[]; + filterColumn?: string; + filterPlaceholder?: string; + onEdit?: (item: TData) => void; + onDelete?: (item: TData) => void; + onRowClick?: (item: TData) => void; +} diff --git a/src/shared/components/loadingButton/LoadingButton.tsx b/src/shared/components/loadingButton/LoadingButton.tsx index f947dce..5690527 100644 --- a/src/shared/components/loadingButton/LoadingButton.tsx +++ b/src/shared/components/loadingButton/LoadingButton.tsx @@ -8,16 +8,7 @@ import type LoadingButtonProps from './LoadingButtonInterface'; const LoadingButton = forwardRef( ( - { - text, - textLoading, - loading = false, - className, - disabled, - type = 'button', - onClick, - ...props - }, + { text, textLoading, loading = false, className, disabled, type = 'button', onClick, ...props }, ref, ) => { const handleClick = (e: React.MouseEvent) => { diff --git a/src/shared/components/situacoes/SituacoesSelect.tsx b/src/shared/components/situacoes/SituacoesSelect.tsx index e261b4f..10402f8 100644 --- a/src/shared/components/situacoes/SituacoesSelect.tsx +++ b/src/shared/components/situacoes/SituacoesSelect.tsx @@ -1,62 +1,73 @@ -import { Button } from "@/components/ui/button"; -import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { SituacoesEnum } from "@/shared/enums/SituacoesEnum"; -import { Command } from "cmdk"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import React from "react"; +import { Button } from '@/components/ui/button'; +import { + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; export default function SituacoesSelect({ field }: any) { - const [open, setOpen] = React.useState(false); + const [open, setOpen] = React.useState(false); - // ✅ Corrigido para enums string-based - const options = Object.entries(SituacoesEnum).map(([value, label]) => ({ - value, - label, - })); + // ✅ Corrigido para enums string-based + const options = Object.entries(SituacoesEnum).map(([value, label]) => ({ + value, + label, + })); - return ( - - - - - - - - - - - Nenhum resultado encontrado. - - {options.map((item) => ( - { - field.onChange(item.value); - setOpen(false); - }} - > - - {item.label} - - ))} - - - - - - ); + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); } diff --git a/src/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect.tsx b/src/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect.tsx index 3370a9b..17146cb 100644 --- a/src/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect.tsx +++ b/src/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect.tsx @@ -1,61 +1,72 @@ -import { Button } from "@/components/ui/button"; -import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { TipoAtoAnteriorEnum } from "@/shared/enums/TipoAtoAnteriorEnum"; -import { Command } from "cmdk"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import React from "react"; +import { Button } from '@/components/ui/button'; +import { + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { TipoAtoAnteriorEnum } from '@/shared/enums/TipoAtoAnteriorEnum'; +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; export default function TipoAtoAnteriorSelect({ field }: any) { - const [open, setOpen] = React.useState(false); + const [open, setOpen] = React.useState(false); - const options = Object.entries(TipoAtoAnteriorEnum).map(([value, label]) => ({ - value, - label, - })); + const options = Object.entries(TipoAtoAnteriorEnum).map(([value, label]) => ({ + value, + label, + })); - return ( - - - - - - - - - - - Nenhum resultado encontrado. - - {options.map((item) => ( - { - field.onChange(item.value); - setOpen(false); - }} - > - - {item.label} - - ))} - - - - - - ); + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); } diff --git a/src/shared/components/tipoDaParte/TipoDaParteSelect.tsx b/src/shared/components/tipoDaParte/TipoDaParteSelect.tsx index 74f6045..950ef7d 100644 --- a/src/shared/components/tipoDaParte/TipoDaParteSelect.tsx +++ b/src/shared/components/tipoDaParte/TipoDaParteSelect.tsx @@ -1,86 +1,84 @@ -import { Button } from "@/components/ui/button"; +import { Button } from '@/components/ui/button'; import { - Command, - CommandEmpty, - CommandGroup, - CommandInput, - CommandItem, - CommandList, -} from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { TipoDaParteEnum } from "@/shared/enums/TIpoDaParteEnum"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import React from "react"; + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { TipoDaParteEnum } from '@/shared/enums/TIpoDaParteEnum'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; type TipoDaParteSelectProps = { - field: { - value?: number | null; - onChange: (value: number) => void; - }; + field: { + value?: number | null; + onChange: (value: number) => void; + }; }; export default function TipoDaParteSelect({ field }: TipoDaParteSelectProps) { - const [open, setOpen] = React.useState(false); + const [open, setOpen] = React.useState(false); - // Cria as opções a partir do enum - const options = Object.entries(TipoDaParteEnum).map(([key, label]) => ({ - value: Number(key), - label, - })); + // Cria as opções a partir do enum + const options = Object.entries(TipoDaParteEnum).map(([key, label]) => ({ + value: Number(key), + label, + })); - // Label exibida atualmente - const selectedLabel = - field.value !== undefined && field.value !== null - ? options.find((item) => item.value === Number(field.value))?.label - : "Selecione..."; + // Label exibida atualmente + const selectedLabel = + field.value !== undefined && field.value !== null + ? options.find((item) => item.value === Number(field.value))?.label + : 'Selecione...'; - return ( - - - - - - - - - - - Nenhum resultado encontrado. - - {options.map((item) => ( - { - field.onChange(item.value); // envia número - setOpen(false); - }} - > - - {item.label} - - ))} - - - - - - ); + return ( + + + + + + + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + { + field.onChange(item.value); // envia número + setOpen(false); + }} + > + + {item.label} + + ))} + + + + + + ); } diff --git a/src/shared/components/tipoNatureza/TipoNaturezaSelect.tsx b/src/shared/components/tipoNatureza/TipoNaturezaSelect.tsx index f848f5e..527d588 100644 --- a/src/shared/components/tipoNatureza/TipoNaturezaSelect.tsx +++ b/src/shared/components/tipoNatureza/TipoNaturezaSelect.tsx @@ -1,107 +1,105 @@ -import { Button } from "@/components/ui/button"; +import { Button } from '@/components/ui/button'; import { - CommandEmpty, - CommandGroup, - CommandInput, - CommandItem, - CommandList, -} from "@/components/ui/command"; -import { FormControl } from "@/components/ui/form"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { TipoNaturezaEnum } from "@/shared/enums/TipoNaturezaEnum"; -import { Command } from "cmdk"; -import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; -import React from "react"; + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; +import { FormControl } from '@/components/ui/form'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { cn } from '@/lib/utils'; +import { TipoNaturezaEnum } from '@/shared/enums/TipoNaturezaEnum'; +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; export default function TipoNaturezaSelect({ field }: any) { - const [open, setOpen] = React.useState(false); + const [open, setOpen] = React.useState(false); - // Gera opções a partir do Enum - const options = Object.entries(TipoNaturezaEnum).map(([id, label]) => ({ - value: Number(id), - label, - })); + // Gera opções a partir do Enum + const options = Object.entries(TipoNaturezaEnum).map(([id, label]) => ({ + value: Number(id), + label, + })); - // 🔹 Converte valor recebido (string tipo ";0,1,2,3") para array de números - const parseToArray = (value: any): number[] => { - if (!value) return []; - if (Array.isArray(value)) return value.map(Number); - if (typeof value === "string") { - return value - .replace(/^;/, "") // remove o primeiro ";" - .split(",") - .filter(Boolean) - .map((v) => Number(v.trim())); - } - return []; - }; + // 🔹 Converte valor recebido (string tipo ";0,1,2,3") para array de números + const parseToArray = (value: any): number[] => { + if (!value) return []; + if (Array.isArray(value)) return value.map(Number); + if (typeof value === 'string') { + return value + .replace(/^;/, '') // remove o primeiro ";" + .split(',') + .filter(Boolean) + .map((v) => Number(v.trim())); + } + return []; + }; - // Array de valores selecionados - const selectedValues: number[] = parseToArray(field.value); + // Array de valores selecionados + const selectedValues: number[] = parseToArray(field.value); - // Atualiza valor selecionado (e reenvia como string ";0,1,2,3") - const toggleSelect = (value: number) => { - let newValues; - if (selectedValues.includes(value)) { - newValues = selectedValues.filter((v) => v !== value); - } else { - newValues = [...selectedValues, value]; - } - // Converte para formato ";0,1,2,3" - const formatted = ";" + newValues.join(","); - field.onChange(formatted); - }; + // Atualiza valor selecionado (e reenvia como string ";0,1,2,3") + const toggleSelect = (value: number) => { + let newValues; + if (selectedValues.includes(value)) { + newValues = selectedValues.filter((v) => v !== value); + } else { + newValues = [...selectedValues, value]; + } + // Converte para formato ";0,1,2,3" + const formatted = ';' + newValues.join(','); + field.onChange(formatted); + }; - // Label do botão (nomes selecionados) - const selectedLabels = options - .filter((opt) => selectedValues.includes(opt.value)) - .map((opt) => opt.label) - .join(", "); + // Label do botão (nomes selecionados) + const selectedLabels = options + .filter((opt) => selectedValues.includes(opt.value)) + .map((opt) => opt.label) + .join(', '); - return ( - - - - - - + return ( + + + + + + - - - - - Nenhum resultado encontrado. - - {options.map((item) => ( - toggleSelect(item.value)} - > - - {item.label} - - ))} - - - - - - ); + + + + + Nenhum resultado encontrado. + + {options.map((item) => ( + toggleSelect(item.value)} + > + + {item.label} + + ))} + + + + + + ); } diff --git a/src/shared/enums/ImovelConstrucaoEnum.ts b/src/shared/enums/ImovelConstrucaoEnum.ts index a28f354..d7c2eb6 100644 --- a/src/shared/enums/ImovelConstrucaoEnum.ts +++ b/src/shared/enums/ImovelConstrucaoEnum.ts @@ -1,5 +1,5 @@ export const ImovelConstrucaoEnum: { [key: number]: string } = { - 0: 'Construção averbada', - 1: 'Em construção', - 2: 'Não se aplica', -}; \ No newline at end of file + 0: 'Construção averbada', + 1: 'Em construção', + 2: 'Não se aplica', +}; diff --git a/src/shared/enums/ImovelTipoClasseEnum.ts b/src/shared/enums/ImovelTipoClasseEnum.ts index 0f4a3dc..4e5269f 100644 --- a/src/shared/enums/ImovelTipoClasseEnum.ts +++ b/src/shared/enums/ImovelTipoClasseEnum.ts @@ -1,4 +1,4 @@ export const ImovelTipoClasseEnum: { [key: number]: string } = { - 1: 'Urbano', - 3: 'Rural', -}; \ No newline at end of file + 1: 'Urbano', + 3: 'Rural', +}; diff --git a/src/shared/enums/ImovelTipoEnum.ts b/src/shared/enums/ImovelTipoEnum.ts index edebfa5..cce80bd 100644 --- a/src/shared/enums/ImovelTipoEnum.ts +++ b/src/shared/enums/ImovelTipoEnum.ts @@ -1,22 +1,22 @@ export const ImovelTipoEnum: { [key: number]: string } = { - 15: 'Loja', - 31: 'Galpão', - 65: 'Apartamento', - 67: 'Casa', - 69: 'Fazenda / Sítio / Chácara', - 71: 'Terreno / Fração', - 89: 'Outros', - 90: 'Sala', - 91: 'Conjunto de salas', - 92: 'Sobreloja', - 17: 'Sala / Conjunto', - 33: 'Prédio Comercial', - 35: 'Prédio Residencial', - 73: 'Sala ou Loja', - 85: 'Construções', - 87: 'Desmembramento', - 93: 'Vaga de Garagem', - 94: 'Laje', - 95: 'Estacionamento', - 96: 'Barraco' -}; \ No newline at end of file + 15: 'Loja', + 31: 'Galpão', + 65: 'Apartamento', + 67: 'Casa', + 69: 'Fazenda / Sítio / Chácara', + 71: 'Terreno / Fração', + 89: 'Outros', + 90: 'Sala', + 91: 'Conjunto de salas', + 92: 'Sobreloja', + 17: 'Sala / Conjunto', + 33: 'Prédio Comercial', + 35: 'Prédio Residencial', + 73: 'Sala ou Loja', + 85: 'Construções', + 87: 'Desmembramento', + 93: 'Vaga de Garagem', + 94: 'Laje', + 95: 'Estacionamento', + 96: 'Barraco', +}; diff --git a/src/shared/enums/ImovelTipoRegistro.ts b/src/shared/enums/ImovelTipoRegistro.ts index 5476b98..e5fb690 100644 --- a/src/shared/enums/ImovelTipoRegistro.ts +++ b/src/shared/enums/ImovelTipoRegistro.ts @@ -1,5 +1,5 @@ export enum ImovelTipoRegistro { - M = 'Matrícula', - T = 'Transcrição', - I = 'Inscrição', -} \ No newline at end of file + M = 'Matrícula', + T = 'Transcrição', + I = 'Inscrição', +} diff --git a/src/shared/enums/TIpoDaParteEnum.ts b/src/shared/enums/TIpoDaParteEnum.ts index da6fea7..ee722c3 100644 --- a/src/shared/enums/TIpoDaParteEnum.ts +++ b/src/shared/enums/TIpoDaParteEnum.ts @@ -1,8 +1,8 @@ export const TipoDaParteEnum = { - 0: 'Outorgante Rc. Outorgado', - 1: 'Outorgante', - 2: 'Outorgado', - 3: 'Auxiliar do Ato', - 4: 'Auxiliar da Parte', - 6: 'Declarante', -} as const; \ No newline at end of file + 0: 'Outorgante Rc. Outorgado', + 1: 'Outorgante', + 2: 'Outorgado', + 3: 'Auxiliar do Ato', + 4: 'Auxiliar da Parte', + 6: 'Declarante', +} as const; diff --git a/src/shared/enums/TipoAtoAnteriorEnum.ts b/src/shared/enums/TipoAtoAnteriorEnum.ts index 812688c..60813f5 100644 --- a/src/shared/enums/TipoAtoAnteriorEnum.ts +++ b/src/shared/enums/TipoAtoAnteriorEnum.ts @@ -1,8 +1,8 @@ export const TipoAtoAnteriorEnum = { - 6: 'Substabelecido', - 7: 'Revogado', - 8: 'Reratificado', - 9: 'Renunciado', - 10: 'Renúncia', - 11: 'Renúncia Parcial' -} as const; \ No newline at end of file + 6: 'Substabelecido', + 7: 'Revogado', + 8: 'Reratificado', + 9: 'Renunciado', + 10: 'Renúncia', + 11: 'Renúncia Parcial', +} as const; diff --git a/src/shared/enums/TipoNaturezaEnum.ts b/src/shared/enums/TipoNaturezaEnum.ts index d6cb0a0..e9163e3 100644 --- a/src/shared/enums/TipoNaturezaEnum.ts +++ b/src/shared/enums/TipoNaturezaEnum.ts @@ -1,6 +1,6 @@ export const TipoNaturezaEnum = { - 1: 'Escritura', - 2: 'Procuração', - 3: 'Substabelecimento', - 4: 'Testamento', -} as const; \ No newline at end of file + 1: 'Escritura', + 2: 'Procuração', + 3: 'Substabelecimento', + 4: 'Testamento', +} as const; diff --git a/src/shared/services/api/interfaces/ApiResponseInterface.ts b/src/shared/services/api/interfaces/ApiResponseInterface.ts index e3bf716..2d16fe8 100644 --- a/src/shared/services/api/interfaces/ApiResponseInterface.ts +++ b/src/shared/services/api/interfaces/ApiResponseInterface.ts @@ -1,5 +1,5 @@ export default interface ApiResponseInterface { - status: number - message: string - data?: T | T[] | null -} \ No newline at end of file + status: number; + message: string; + data?: T | T[] | null; +} From d3d8ac4a28edcd134b2c3b431dd5fde686c35714 Mon Sep 17 00:00:00 2001 From: keven Date: Sat, 18 Oct 2025 12:37:44 -0300 Subject: [PATCH 09/11] =?UTF-8?q?fix(ESlint):=20Ajusta=20importa=C3=A7?= =?UTF-8?q?=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.json | 33 - eslint.config.js | 23 - eslint.config.mjs | 73 + package-lock.json | 1514 ++++++++--------- package.json | 7 +- .../data/GCidade/GCidadeIndexData.ts | 2 +- .../GTBRegimeComunhaoIndexData.ts | 3 +- .../TCensecTipoAto/GMedidaTipoIndexData.ts | 2 +- .../schemas/GTBBairro/GTBBairroSchema.ts | 3 +- .../TCensecNaturezaLitigioSchema.ts | 3 +- .../TCensecTipoAto/TCensecTipoAtoSchema.ts | 1 + .../TTBAndamentoServicoSchema.ts | 1 + .../TTBReconhecimentoTipoSchema.ts | 1 + .../services/GCidade/GCidadeIndexService.ts | 2 +- .../GMedidaTipo/GMedidaTipoIndexService.ts | 1 + .../GTBBairro/GTBBairroIndexService.ts | 2 +- .../GTBEstadoCivilIndexService.ts | 1 + .../GTBRegimeComunhaoIndexService.ts | 1 + .../GTBTipoLogradouroIndexService.ts | 1 + .../TAtoParteTipoIndexService.ts | 1 + .../services/TCensec/TCensecIndexService.ts | 1 + .../TCensecNaturezaLitigioIndexService.ts | 1 + .../TCensecQualidadeIndexService.ts | 1 + .../TCensecTipoAtoIndexService.ts | 1 + .../TCensecTipoNaturezaIndexService.ts | 1 + .../TPessoaFisicaIndexService.ts | 2 +- .../TPessoaJuridicaIndexService.ts | 3 +- src/shared/actions/json/Json.ts | 1 + 28 files changed, 785 insertions(+), 901 deletions(-) delete mode 100644 .eslintrc.json delete mode 100644 eslint.config.js create mode 100644 eslint.config.mjs diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 45cf1a9..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,33 +0,0 @@ -// .eslintrc.json -{ - "extends": [ - // 1. Configurações base do Next/React - "next/core-web-vitals", - // 2. Regras para ordenar e gerenciar importações - "plugin:import/recommended", - // 3. DESATIVA as regras do ESLint que conflitam com o Prettier (DEVE SER O ÚLTIMO) - "prettier" - ], - "plugins": ["import"], - "rules": { - /* --- Qualidade do Código (Next.js/React) --- */ - // Essa regra (já incluída no Next.js, mas bom reforçar) é a que remove imports não usados - "no-unused-vars": "error", - "react/jsx-uses-vars": "error", - /* --- Ordem e Remoção de Importações (eslint-plugin-import) --- */ - // Configura a regra para a ordem das importações (groups/grupos) - "import/order": [ - "error", - { - "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], - "newlines-between": "always", - "alphabetize": { - "order": "asc", - "caseInsensitive": true - } - } - ], - // Garante que o Next.js reconheça imports (como 'next/image', 'next/link') - "import/no-unresolved": "error" - } -} diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index 7da95d2..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,23 +0,0 @@ -import next from 'eslint-config-next'; -import importPlugin from 'eslint-plugin-import'; - -export default [ - next, - { - plugins: { - import: importPlugin, - }, - rules: { - 'import/order': [ - 'error', - { - groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']], - 'newlines-between': 'always', - alphabetize: { order: 'asc', caseInsensitive: true }, - }, - ], - semi: ['error', 'always'], - quotes: ['error', 'double'], - }, - }, -]; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..23fa267 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,73 @@ +import js from "@eslint/js"; +import reactPlugin from "eslint-plugin-react"; +import reactHooks from "eslint-plugin-react-hooks"; +import jsxA11y from "eslint-plugin-jsx-a11y"; +import importPlugin from "eslint-plugin-import"; + +export default [ + js.configs.recommended, + { + files: ["**/*.{js,jsx,ts,tsx}"], + ignores: [ + "node_modules/**", + ".next/**", + "out/**", + "dist/**" + ], + languageOptions: { + ecmaVersion: "latest", + sourceType: "module", + globals: { + React: true, + JSX: true + } + }, + plugins: { + react: reactPlugin, + "react-hooks": reactHooks, + "jsx-a11y": jsxA11y, + import: importPlugin + }, + settings: { + react: { version: "detect" }, + "import/resolver": { + node: { extensions: [".js", ".jsx", ".ts", ".tsx"] }, + typescript: {} + } + }, + rules: { + /* React */ + "react/react-in-jsx-scope": "off", + "react/jsx-uses-react": "off", + "react/jsx-uses-vars": "warn", + + /* Hooks */ + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn", + + /* Importação e organização */ + "import/order": [ + "error", + { + groups: [ + ["builtin", "external"], + ["internal"], + ["parent", "sibling", "index"] + ], + pathGroups: [ + { + pattern: "@/**", + group: "internal", + position: "after" + } + ], + alphabetize: { order: "asc", caseInsensitive: true }, + "newlines-between": "always" + } + ], + "import/no-duplicates": "error", + "import/newline-after-import": ["error", { count: 1 }], + "no-unused-vars": "warn" + } + } +]; diff --git a/package-lock.json b/package-lock.json index be7b85e..e946475 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,6 @@ "zod": "^4.0.17" }, "devDependencies": { - "@rushstack/eslint-patch": "^1.12.0", "@tailwindcss/postcss": "^4", "@types/js-cookie": "^3.0.6", "@types/jsonwebtoken": "^9.0.10", @@ -57,11 +56,13 @@ "@types/react-dom": "^19", "@typescript-eslint/eslint-plugin": "^8.45.0", "@typescript-eslint/parser": "^8.45.0", - "eslint": "^8.57.1", - "eslint-config-next": "^15.5.4", + "eslint": "^9.38.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-import": "^2.32.0", + "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^7.0.0", "eslint-plugin-unused-imports": "^4.2.0", "prettier": "^3.6.2", "prettier-plugin-tailwindcss": "^0.6.14", @@ -83,6 +84,279 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", + "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", + "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.4", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.4", + "@babel/types": "^7.28.4", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.4" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", + "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.4", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@emnapi/core": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", @@ -145,17 +419,82 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.1.tgz", + "integrity": "sha512-csZAzkNhsgwb0I/UAV6/RGFTbiakPCf0ZrGmrIxQpYvGZ00PhTkSnyKNolphgIvmnJeGw6rcGVEXfTzUnFuEvw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.16.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", + "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -163,7 +502,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -204,13 +543,40 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", + "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz", + "integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.16.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@faker-js/faker": { @@ -279,44 +645,28 @@ "react-hook-form": "^7.55.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -333,13 +683,19 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@img/colour": { "version": "1.0.0", @@ -851,46 +1207,6 @@ "integrity": "sha512-2Zhvss36s/yL+YSxD5ZL5dz5pI6ki1OLxYlh6O77VJ68sBnlUrl5YqhBgCy7FkdMsp9RBeGFwpuDCdpJOqdKeQ==", "license": "MIT" }, - "node_modules/@next/eslint-plugin-next": { - "version": "15.5.5", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.5.5.tgz", - "integrity": "sha512-FMzm412l9oFB8zdRD+K6HQ1VzlS+sNNsdg0MfvTg0i8lfCyTgP/RFxiu/pGJqZ/IQnzn9xSiLkjOVI7Iv4nbdQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-glob": "3.3.1" - } - }, - "node_modules/@next/eslint-plugin-next/node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/@next/eslint-plugin-next/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@next/swc-darwin-arm64": { "version": "15.5.5", "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.5.tgz", @@ -1057,16 +1373,6 @@ "node": ">= 8" } }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", - "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.4.0" - } - }, "node_modules/@pkgr/core": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", @@ -2052,13 +2358,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@rushstack/eslint-patch": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.14.0.tgz", - "integrity": "sha512-WJFej426qe4RWOm9MMtP4V3CV4AucXolQty+GRgAWLgQXmpCuwzs7hEpxxhSc/znXUSxum9d/P/32MW0FlAAlA==", - "dev": true, - "license": "MIT" - }, "node_modules/@standard-schema/utils": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz", @@ -2413,6 +2712,13 @@ "tslib": "^2.4.0" } }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/js-cookie": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.6.tgz", @@ -2420,6 +2726,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -2710,282 +3023,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "license": "ISC" - }, - "node_modules/@unrs/resolver-binding-android-arm-eabi": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", - "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@unrs/resolver-binding-android-arm64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", - "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", - "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", - "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", - "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", - "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", - "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", - "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", - "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", - "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", - "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", - "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", - "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", - "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", - "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", - "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.11" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", - "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", - "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", - "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -3026,16 +3063,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -3301,6 +3328,16 @@ "dev": true, "license": "MIT" }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.18", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.18.tgz", + "integrity": "sha512-UYmTpOBwgPScZpS4A+YbapwWuBwasxvO/2IOHArSsAhL/+ZdmATBXTex3t+l2hXwLVYK382ibr/nKoY9GKe86w==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, "node_modules/brace-expansion": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", @@ -3324,6 +3361,40 @@ "node": ">=8" } }, + "node_modules/browserslist": { + "version": "4.26.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", + "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.8.9", + "caniuse-lite": "^1.0.30001746", + "electron-to-chromium": "^1.5.227", + "node-releases": "^2.0.21", + "update-browserslist-db": "^1.1.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -3507,6 +3578,13 @@ "dev": true, "license": "MIT" }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, "node_modules/cookie": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", @@ -3690,16 +3768,16 @@ "license": "MIT" }, "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, "node_modules/dunder-proto": { @@ -3726,6 +3804,13 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/electron-to-chromium": { + "version": "1.5.237", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.237.tgz", + "integrity": "sha512-icUt1NvfhGLar5lSWH3tHNzablaA5js3HVHacQimfP8ViEBOQv+L7DKEuHdbTZ0SKCO1ogTJTIL1Gwk9S6Qvcg==", + "dev": true, + "license": "ISC" + }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -3924,6 +4009,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -3938,86 +4033,61 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz", + "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.1", + "@eslint/core": "^0.16.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.38.0", + "@eslint/plugin-kit": "^0.4.0", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-next": { - "version": "15.5.5", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.5.5.tgz", - "integrity": "sha512-f8lRSSelp6cqrYjxEMjJ5En3WV913gTu/w9goYShnIujwDSQlKt4x9MwSDiduE9R5mmFETK44+qlQDxeSA0rUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@next/eslint-plugin-next": "15.5.5", - "@rushstack/eslint-patch": "^1.10.3", - "@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-import-resolver-typescript": "^3.5.2", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jsx-a11y": "^6.10.0", - "eslint-plugin-react": "^7.37.0", - "eslint-plugin-react-hooks": "^5.0.0" + "url": "https://eslint.org/donate" }, "peerDependencies": { - "eslint": "^7.23.0 || ^8.0.0 || ^9.0.0", - "typescript": ">=3.3.1" + "jiti": "*" }, "peerDependenciesMeta": { - "typescript": { + "jiti": { "optional": true } } @@ -4060,41 +4130,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-import-resolver-typescript": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz", - "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.4.0", - "get-tsconfig": "^4.10.0", - "is-bun-module": "^2.0.0", - "stable-hash": "^0.0.5", - "tinyglobby": "^0.2.13", - "unrs-resolver": "^1.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-import-resolver-typescript" - }, - "peerDependencies": { - "eslint": "*", - "eslint-plugin-import": "*", - "eslint-plugin-import-x": "*" - }, - "peerDependenciesMeta": { - "eslint-plugin-import": { - "optional": true - }, - "eslint-plugin-import-x": { - "optional": true - } - } - }, "node_modules/eslint-module-utils": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", @@ -4178,19 +4213,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4333,13 +4355,20 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", - "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.0.0.tgz", + "integrity": "sha512-fNXaOwvKwq2+pXiRpXc825Vd63+KM4DLL40Rtlycb8m7fYpp6efrTp1sa6ZbP/Ap58K2bEKFXRmhURE+CJAQWw==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/core": "^7.24.4", + "@babel/parser": "^7.24.4", + "hermes-parser": "^0.25.1", + "zod": "^3.22.4 || ^4.0.0", + "zod-validation-error": "^3.0.3 || ^4.0.0" + }, "engines": { - "node": ">=10" + "node": ">=18" }, "peerDependencies": { "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" @@ -4356,19 +4385,6 @@ "concat-map": "0.0.1" } }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-plugin-react/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4427,9 +4443,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4437,7 +4453,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4467,6 +4483,19 @@ "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -4491,18 +4520,31 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4629,16 +4671,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -4672,18 +4714,17 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { @@ -4709,13 +4750,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -4767,6 +4801,16 @@ "node": ">= 0.4" } }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -4833,41 +4877,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-tsconfig": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.12.0.tgz", - "integrity": "sha512-LScr2aNr2FbjAjZh2C6X6BxRx1/x+aTDExct/xyq2XKbYOiG5c0aK7pMsSuyc0brz3ibr/lbQiHD9jzt4lccJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -4881,41 +4890,14 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5059,6 +5041,23 @@ "node": ">= 0.4" } }, + "node_modules/hermes-estree": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", + "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", + "dev": true, + "license": "MIT" + }, + "node_modules/hermes-parser": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", + "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hermes-estree": "0.25.1" + } + }, "node_modules/ignore": { "version": "7.0.5", "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", @@ -5096,25 +5095,6 @@ "node": ">=0.8.19" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, "node_modules/input-otp": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/input-otp/-/input-otp-1.4.2.tgz", @@ -5211,16 +5191,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-bun-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", - "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.7.1" - } - }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -5397,16 +5367,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-regex": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", @@ -5622,6 +5582,19 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -6084,6 +6057,23 @@ "loose-envify": "cli.js" } }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lru-cache/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, "node_modules/lucide-react": { "version": "0.540.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.540.0.tgz", @@ -6210,22 +6200,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/napi-postinstall": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", - "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", - "dev": true, - "license": "MIT", - "bin": { - "napi-postinstall": "lib/cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/napi-postinstall" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -6323,6 +6297,13 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/node-releases": { + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.25.tgz", + "integrity": "sha512-4auku8B/vw5psvTiiN9j1dAOsXvMoGqJuKJcR+dTdqiXEK20mMTk1UEo3HS16LeGQsVG6+qKTPM9u/qQ2LqATA==", + "dev": true, + "license": "MIT" + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -6445,16 +6426,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -6546,16 +6517,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -6992,16 +6953,6 @@ "node": ">=4" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, "node_modules/reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", @@ -7013,23 +6964,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7357,13 +7291,6 @@ "node": ">=0.10.0" } }, - "node_modules/stable-hash": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", - "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==", - "dev": true, - "license": "MIT" - }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", @@ -7491,19 +7418,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -7640,61 +7554,6 @@ "node": ">=18" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/tinymce": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-8.1.2.tgz", @@ -7769,19 +7628,6 @@ "node": ">= 0.8.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", @@ -7900,39 +7746,35 @@ "dev": true, "license": "MIT" }, - "node_modules/unrs-resolver": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", - "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", "dev": true, - "hasInstallScript": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", "dependencies": { - "napi-postinstall": "^0.3.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.1" }, - "funding": { - "url": "https://opencollective.com/unrs-resolver" + "bin": { + "update-browserslist-db": "cli.js" }, - "optionalDependencies": { - "@unrs/resolver-binding-android-arm-eabi": "1.11.1", - "@unrs/resolver-binding-android-arm64": "1.11.1", - "@unrs/resolver-binding-darwin-arm64": "1.11.1", - "@unrs/resolver-binding-darwin-x64": "1.11.1", - "@unrs/resolver-binding-freebsd-x64": "1.11.1", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", - "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", - "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", - "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-x64-musl": "1.11.1", - "@unrs/resolver-binding-wasm32-wasi": "1.11.1", - "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", - "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", - "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" + "peerDependencies": { + "browserslist": ">= 4.21.0" } }, "node_modules/uri-js": { @@ -8112,13 +7954,6 @@ "node": ">=0.10.0" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, "node_modules/yallist": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", @@ -8150,6 +7985,19 @@ "funding": { "url": "https://github.com/sponsors/colinhacks" } + }, + "node_modules/zod-validation-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz", + "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } } } } diff --git a/package.json b/package.json index 798ea1f..2f5a319 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "zod": "^4.0.17" }, "devDependencies": { - "@rushstack/eslint-patch": "^1.12.0", "@tailwindcss/postcss": "^4", "@types/js-cookie": "^3.0.6", "@types/jsonwebtoken": "^9.0.10", @@ -59,11 +58,13 @@ "@types/react-dom": "^19", "@typescript-eslint/eslint-plugin": "^8.45.0", "@typescript-eslint/parser": "^8.45.0", - "eslint": "^8.57.1", - "eslint-config-next": "^15.5.4", + "eslint": "^9.38.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-import": "^2.32.0", + "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^7.0.0", "eslint-plugin-unused-imports": "^4.2.0", "prettier": "^3.6.2", "prettier-plugin-tailwindcss": "^0.6.14", diff --git a/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts b/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts index 9661f74..cdf5c56 100644 --- a/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts +++ b/src/packages/administrativo/data/GCidade/GCidadeIndexData.ts @@ -1,11 +1,11 @@ // Importa o serviço de API que será utilizado para realizar requisições HTTP +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; 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 '@/shared/services/api/enums/ApiMethodEnum'; // Importa função que encapsula chamadas assíncronas e trata erros automaticamente -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/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts index 0766aa9..6b6596c 100644 --- a/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts +++ b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoIndexData.ts @@ -1,7 +1,8 @@ import API from '@/shared/services/api/Api'; -import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; + export default async function GTBRegimeComunhaoIndexData() { const api = new API(); diff --git a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts index 428a2a9..a05dd73 100644 --- a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoIndexData.ts @@ -1,6 +1,6 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecTipoAtoIndexData() { const api = new API(); diff --git a/src/packages/administrativo/schemas/GTBBairro/GTBBairroSchema.ts b/src/packages/administrativo/schemas/GTBBairro/GTBBairroSchema.ts index ab2f8de..d0c784f 100644 --- a/src/packages/administrativo/schemas/GTBBairro/GTBBairroSchema.ts +++ b/src/packages/administrativo/schemas/GTBBairro/GTBBairroSchema.ts @@ -1,6 +1,7 @@ -import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import { z } from 'zod'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; + export const GTBBairroSchema = z.object({ tb_bairro_id: z.number(), sistema_id: z.number().nullable(), diff --git a/src/packages/administrativo/schemas/TCensecNaturezaLitigio/TCensecNaturezaLitigioSchema.ts b/src/packages/administrativo/schemas/TCensecNaturezaLitigio/TCensecNaturezaLitigioSchema.ts index 2e14068..35e6e44 100644 --- a/src/packages/administrativo/schemas/TCensecNaturezaLitigio/TCensecNaturezaLitigioSchema.ts +++ b/src/packages/administrativo/schemas/TCensecNaturezaLitigio/TCensecNaturezaLitigioSchema.ts @@ -1,6 +1,7 @@ -import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import { z } from 'zod'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; + export const TCensecNaturezaLitigioSchema = z.object({ censec_naturezalitigio_id: z.number().optional(), descricao: z.string().min(1, 'O campo deve ser preenchido'), diff --git a/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts b/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts index ce31cfe..ee2f613 100644 --- a/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts +++ b/src/packages/administrativo/schemas/TCensecTipoAto/TCensecTipoAtoSchema.ts @@ -1,4 +1,5 @@ import { z } from 'zod'; + import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; export const TCensecTipoAtoSchema = z.object({ diff --git a/src/packages/administrativo/schemas/TTBAndamentoServico/TTBAndamentoServicoSchema.ts b/src/packages/administrativo/schemas/TTBAndamentoServico/TTBAndamentoServicoSchema.ts index c581ce1..fabf041 100644 --- a/src/packages/administrativo/schemas/TTBAndamentoServico/TTBAndamentoServicoSchema.ts +++ b/src/packages/administrativo/schemas/TTBAndamentoServico/TTBAndamentoServicoSchema.ts @@ -1,4 +1,5 @@ import { z } from 'zod'; + import { tipoEnum } from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; export const TTBAndamentoServicoSchema = z.object({ diff --git a/src/packages/administrativo/schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema.ts b/src/packages/administrativo/schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema.ts index 2e248fa..017144a 100644 --- a/src/packages/administrativo/schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema.ts +++ b/src/packages/administrativo/schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema.ts @@ -1,4 +1,5 @@ import { z } from 'zod'; + import { situacaoEnum } from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; export const TTBReconhecimentoTipoSchema = z.object({ diff --git a/src/packages/administrativo/services/GCidade/GCidadeIndexService.ts b/src/packages/administrativo/services/GCidade/GCidadeIndexService.ts index ce3431b..761f6ab 100644 --- a/src/packages/administrativo/services/GCidade/GCidadeIndexService.ts +++ b/src/packages/administrativo/services/GCidade/GCidadeIndexService.ts @@ -1,6 +1,6 @@ +import { GCidadeIndexData } from '@/packages/administrativo/data/GCidade/GCidadeIndexData'; 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 '@/packages/administrativo/data/GCidade/GCidadeIndexData'; // Função que retorna os dados da lista de cidades (chamada à API ou mock) // Função assíncrona que executa a chamada para buscar os dados de cidades diff --git a/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoIndexService.ts b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoIndexService.ts index d453af5..a63ee8f 100644 --- a/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoIndexService.ts +++ b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GMedidaTipoIndexData } from '../../data/GMedidoTipo/GMedidaTipoIndexData'; async function executeGMedidaTipoIndexService() { diff --git a/src/packages/administrativo/services/GTBBairro/GTBBairroIndexService.ts b/src/packages/administrativo/services/GTBBairro/GTBBairroIndexService.ts index 8f6e8b4..5681f34 100644 --- a/src/packages/administrativo/services/GTBBairro/GTBBairroIndexService.ts +++ b/src/packages/administrativo/services/GTBBairro/GTBBairroIndexService.ts @@ -1,5 +1,5 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBBairroIndexData } from '@/packages/administrativo/data/GTBBairro/GTBBairroIndexData'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBBairroIndexService() { const response = await GTBBairroIndexData(); diff --git a/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts index df48dc2..9d8c58e 100644 --- a/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts +++ b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GTBEstadoCivilIndexData } from '../../data/GTBEstadoCivil/GTBEstadoCivilIndexData'; async function executeGTBEstadoCivilIndexService() { diff --git a/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService.ts b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService.ts index c8548f8..be72105 100644 --- a/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService.ts +++ b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import GTBRegimeComunhaoIndexData from '../../data/GTRegimeComunhao/GTBRegimeComunhaoIndexData'; async function executeGTBRegimeComunhaoIndexService() { diff --git a/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroIndexService.ts b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroIndexService.ts index 778ffcc..e7b8b3a 100644 --- a/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroIndexService.ts +++ b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GTBTipoLogradouroIndexData } from '../../data/GTBTipoLogradouro/GTBTipoLogradouroIndexData'; async function executeGTBTipoLogradouroIndexService() { diff --git a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoIndexService.ts b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoIndexService.ts index d6a9203..03c4145 100644 --- a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoIndexService.ts +++ b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TAtoParteTipoIndexData } from '../../data/TAtoTipoParte/TAtoTipoParteIndexData'; export default async function executeTAtoParteTipoIndexService() { diff --git a/src/packages/administrativo/services/TCensec/TCensecIndexService.ts b/src/packages/administrativo/services/TCensec/TCensecIndexService.ts index 09624e4..87d8d14 100644 --- a/src/packages/administrativo/services/TCensec/TCensecIndexService.ts +++ b/src/packages/administrativo/services/TCensec/TCensecIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecIndexData } from '../../data/TCensec/TCensecIndexData'; export default async function executeTCensecIndexService() { diff --git a/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService.ts b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService.ts index 00a98ef..44728fa 100644 --- a/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService.ts +++ b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecNaturezaLitigioIndexData } from '../../data/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexData'; async function executeTCensecNaturezaLitigioIndexService() { diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts index 5fca667..6369616 100644 --- a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecQualidadeIndexData } from '../../data/TCensecQualidade/TCensecQualidadeIndexData'; export default async function executeTCensecQualidadeIndexService() { diff --git a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts index 071c0c1..3856833 100644 --- a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecTipoAtoIndexData } from '../../data/TCensecTipoAto/GMedidaTipoIndexData'; async function executeTCensecTipoAtoIndexService() { diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts index 01a56c3..f3e62b8 100644 --- a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecTipoNaturezaIndexData } from '../../data/TCensecTipoNatureza/TCensecTipoNaturezaIndexData'; export default async function executeTCensecTipoNaturezaIndexService() { diff --git a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService.ts b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService.ts index e9369a9..d0a94f8 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService.ts @@ -1,5 +1,5 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TPessoaFisicaIndexData } from '@/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaIndexData'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaFisicaIndexService() { const response = await TPessoaFisicaIndexData(); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexService.ts b/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexService.ts index 885320b..8b1243f 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexService.ts @@ -1,5 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TPessoaJuridicaIndexData } from '@/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexData'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + async function executeTPessoaJuridicaIndexService() { const response = await TPessoaJuridicaIndexData(); return response; diff --git a/src/shared/actions/json/Json.ts b/src/shared/actions/json/Json.ts index db93182..3f95110 100644 --- a/src/shared/actions/json/Json.ts +++ b/src/shared/actions/json/Json.ts @@ -1,4 +1,5 @@ import appConfig from '../../../config/app.json'; + export default class Json { static execute() { return appConfig; From d5b8aad221684a2de485b938489d07a33c85c3b7 Mon Sep 17 00:00:00 2001 From: keven Date: Sat, 18 Oct 2025 12:49:41 -0300 Subject: [PATCH 10/11] fix(ESLint): Ajusta para ser aprovado no eslint --- eslint.config.mjs | 40 ++++++++++++------- package-lock.json | 4 +- package.json | 4 +- .../hooks/GNatureza/useGNaturezaSaveHook.ts | 2 +- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 23fa267..0c872b6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -3,11 +3,17 @@ import reactPlugin from "eslint-plugin-react"; import reactHooks from "eslint-plugin-react-hooks"; import jsxA11y from "eslint-plugin-jsx-a11y"; import importPlugin from "eslint-plugin-import"; +import tseslint from "typescript-eslint"; export default [ + // Configuração base JavaScript js.configs.recommended, + + // Configurações recomendadas para TypeScript + ...tseslint.configs.recommended, + { - files: ["**/*.{js,jsx,ts,tsx}"], + files: ["**/*.ts", "**/*.tsx"], ignores: [ "node_modules/**", ".next/**", @@ -17,23 +23,27 @@ export default [ languageOptions: { ecmaVersion: "latest", sourceType: "module", + parser: tseslint.parser, + parserOptions: { + project: "./tsconfig.json", + }, globals: { React: true, - JSX: true - } + JSX: true, + }, }, plugins: { react: reactPlugin, "react-hooks": reactHooks, "jsx-a11y": jsxA11y, - import: importPlugin + import: importPlugin, }, settings: { react: { version: "detect" }, "import/resolver": { node: { extensions: [".js", ".jsx", ".ts", ".tsx"] }, - typescript: {} - } + typescript: {}, + }, }, rules: { /* React */ @@ -52,22 +62,24 @@ export default [ groups: [ ["builtin", "external"], ["internal"], - ["parent", "sibling", "index"] + ["parent", "sibling", "index"], ], pathGroups: [ { pattern: "@/**", group: "internal", - position: "after" - } + position: "after", + }, ], alphabetize: { order: "asc", caseInsensitive: true }, - "newlines-between": "always" - } + "newlines-between": "always", + }, ], "import/no-duplicates": "error", "import/newline-after-import": ["error", { count: 1 }], - "no-unused-vars": "warn" - } - } + + /* Gerais */ + "no-unused-vars": "warn", + }, + }, ]; diff --git a/package-lock.json b/package-lock.json index e946475..bf13b5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,8 +54,8 @@ "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", - "@typescript-eslint/eslint-plugin": "^8.45.0", - "@typescript-eslint/parser": "^8.45.0", + "@typescript-eslint/eslint-plugin": "^8.46.1", + "@typescript-eslint/parser": "^8.46.1", "eslint": "^9.38.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-import": "^2.32.0", diff --git a/package.json b/package.json index 2f5a319..460ae38 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", - "@typescript-eslint/eslint-plugin": "^8.45.0", - "@typescript-eslint/parser": "^8.45.0", + "@typescript-eslint/eslint-plugin": "^8.46.1", + "@typescript-eslint/parser": "^8.46.1", "eslint": "^9.38.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-import": "^2.32.0", diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts index 6049f02..d98e25b 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts @@ -8,7 +8,7 @@ import { GNaturezaSaveService } from '../../services/GNatureza/GNaturezaSaveServ export const useGNaturezaSaveHook = () => { const { setResponse } = useResponse(); - const [gNatureza, setGNatureza] = useState(); + const [gNatureza, setGNatureza] = useState(null); // controla se o formulário está aberto ou fechado const [isOpen, setIsOpen] = useState(false); From 325ca693177bd71f387fc52a2749a6fc632eebfa Mon Sep 17 00:00:00 2001 From: keven Date: Sat, 18 Oct 2025 13:16:15 -0300 Subject: [PATCH 11/11] =?UTF-8?q?fix(ESLint):=20aplica=20corre=C3=A7=C3=B5?= =?UTF-8?q?es=20do=20eslint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.mjs | 27 +- next.config.ts | 4 + package-lock.json | 499 +++++++++++++++++- package.json | 4 +- .../components/GCidade/GCidadeForm.tsx | 17 +- .../components/GCidade/GCidadeIndex.tsx | 13 +- .../components/GCidade/GCidadeTable.tsx | 3 +- .../GMedidaTipo/GMedidaTipoForm.tsx | 7 +- .../GMedidaTipo/GMedidaTipoIndex.tsx | 24 +- .../GMedidaTipo/GMedidaTipoTable.tsx | 4 +- .../components/GNatureza/GNaturezaColumns.tsx | 6 +- .../components/GNatureza/GNaturezaForm.tsx | 7 +- .../components/GNatureza/GNaturezaIndex.tsx | 11 +- .../components/GNatureza/GNaturezaTable.tsx | 1 + .../components/GTBBairro/GTBBairroForm.tsx | 10 +- .../components/GTBBairro/GTBBairroIndex.tsx | 24 +- .../components/GTBBairro/GTBBairroSelect.tsx | 6 +- .../components/GTBBairro/GTBBairroTable.tsx | 7 +- .../GTBEstadoCivil/GTBEstadoCivilForm.tsx | 8 +- .../GTBEstadoCivil/GTBEstadoCivilIndex.tsx | 22 +- .../GTBEstadoCivil/GTBEstadoCivilTable.tsx | 4 +- .../GTBProfissao/GTBProfissaoForm.tsx | 4 +- .../GTBProfissao/GTBProfissaoIndex.tsx | 16 +- .../GTBProfissao/GTBProfissaoTable.tsx | 3 +- .../GTBRegimeBens/GTBRegimeBensForm.tsx | 8 +- .../GTBRegimeBens/GTBRegimeBensIndex.tsx | 18 +- .../GTBRegimeBens/GTBRegimeBensTable.tsx | 4 +- .../GTBRegimeComunhaoForm.tsx | 8 +- .../GTBRegimeComunhaoIndex.tsx | 21 +- .../GTBRegimeComunhaoTable.tsx | 3 +- .../GTBTipoLogradouroForm.tsx | 7 +- .../GTBTipoLogradouroIndex.tsx | 15 +- .../GTBTipoLogradouroTable.tsx | 4 +- .../TAtoParteTipo/TAtoParteTipoColumns.tsx | 10 +- .../TAtoParteTipo/TAtoParteTipoForm.tsx | 12 +- .../TAtoParteTipo/TAtoParteTipoIndex.tsx | 11 +- .../TAtoParteTipo/TAtoParteTipoTable.tsx | 1 + .../components/TCensec/TCensecForm.tsx | 7 +- .../components/TCensec/TCensecIndex.tsx | 21 +- .../components/TCensec/TCensecTable.tsx | 4 +- .../TCensecNaturezaLitigioForm.tsx | 9 +- .../TCensecNaturezaLitigioIndex.tsx | 25 +- .../TCensecNaturezaLitigioTable.tsx | 3 +- .../TCensecQualidadeColumns.tsx | 8 +- .../TCensecQualidade/TCensecQualidadeForm.tsx | 9 +- .../TCensecQualidadeIndex.tsx | 11 +- .../TCensecQualidadeSelect.tsx | 4 +- .../TCensecQualidadeTable.tsx | 1 + .../TCensecQualidadeAtoColumns.tsx | 4 +- .../TCensecQualidadeAtoForm.tsx | 12 +- .../TCensecQualidadeAtoFormColumns.tsx | 10 +- .../TCensecQualidadeAtoIndex.tsx | 12 +- .../TCensecTipoAto/TCensecTipoAtoForm.tsx | 19 +- .../TCensecTipoAto/TCensecTipoAtoIndex.tsx | 25 +- .../TCensecTipoAto/TCensecTipoAtoSelect.tsx | 5 +- .../TCensecTipoAto/TCensecTipoAtoTable.tsx | 6 +- .../TCensecTipoNaturezaColumns.tsx | 8 +- .../TCensecTipoNaturezaForm.tsx | 13 +- .../TCensecTipoNaturezaIndex.tsx | 11 +- .../TCensecTipoNaturezaTable.tsx | 1 + .../components/TImovel/TImovelColumns.tsx | 14 +- .../components/TImovel/TImovelForm.tsx | 18 +- .../components/TImovel/TImovelIndex.tsx | 13 +- .../components/TImovel/TImovelTable.tsx | 1 + .../TImovel/TImovelTipoConstrucaoSelect.tsx | 7 +- .../TImovel/TImovelTipoImovelSelect.tsx | 7 +- .../TImovel/TImovelTipoLogradouroSelect.tsx | 5 +- .../TImovel/TImovelTipoRegistroSelect.tsx | 7 +- .../TImovelUnidadeRuralColumns.tsx | 5 +- .../TImovelUnidadeRuralForm.tsx | 12 +- .../TImovelUnidadeRuralIndex.tsx | 16 +- .../TImovelUnidadeRuralTable.tsx | 5 +- .../TImovelUnidadeUrbanoColumns.tsx | 5 +- .../TImovelUnidadeUrbanoForm.tsx | 10 +- .../TImovelUnidadeUrbanoIndex.tsx | 17 +- .../TImovelUnidadeUrbanoTable.tsx | 5 +- .../components/TMinuta/TMinutaForm.tsx | 6 +- .../components/TMinuta/TMinutaTable.tsx | 4 +- .../TPessoaFisica/TPessoaFisicaColumns.tsx | 16 +- .../TPessoaFisica/TPessoaFisicaForm.tsx | 39 +- .../TPessoaFisica/TPessoaFisicaIndex.tsx | 11 +- .../TPessoaFisica/TPessoaFisicaTable.tsx | 3 +- .../TPessoaJuridicaColumns.tsx | 14 +- .../TPessoaJuridica/TPessoaJuridicaForm.tsx | 10 +- .../TPessoaJuridica/TPessoaJuridicaIndex.tsx | 17 +- .../TPessoaJuridica/TPessoaJuridicaTable.tsx | 2 +- .../TPessoaRepresentanteColumns.tsx | 8 +- .../TPessoaRepresentanteForm.tsx | 10 +- .../TPessoaRepresentanteIndex.tsx | 14 +- .../TPessoasRepresentanteFormColumns.tsx | 10 +- .../TTBAndamentoServicoForm.tsx | 6 +- .../TTBAndamentoServicoIndex.tsx | 17 +- .../TTBAndamentoServicoTable.tsx | 3 +- .../TTBReconhecimentoTipoForm.tsx | 6 +- .../TTBReconhecimentoTipoIndex.tsx | 14 +- .../TTBReconhecimentoTipoTable.tsx | 3 +- .../data/GCidade/GCidadeRemoveData.ts | 4 +- .../data/GCidade/GCidadeSaveData.ts | 4 +- .../data/GMedidoTipo/GMedidaTipoRemoveData.ts | 7 +- .../data/GMedidoTipo/GMedidaTipoSaveData.ts | 7 +- .../data/GNatureza/GNaturezaDeleteData.ts | 3 +- .../data/GNatureza/GNaturezaIndexData.ts | 5 +- .../data/GNatureza/GNaturezaSaveData.ts | 3 +- .../data/GTBBairro/GTBBairroRemoveData.ts | 4 +- .../data/GTBBairro/GTBBairroSaveData.ts | 4 +- .../GTBEstadoCivilRemoveData.ts | 7 +- .../GTBEstadoCivil/GTBEstadoCivilSaveData.ts | 7 +- .../GTBProfissao/GTBProfissaoRemoveData.ts | 2 +- .../data/GTBProfissao/GTBProfissaoSaveData.ts | 2 +- .../GTBRegimeBens/GTBRegimeBensRemoveData.ts | 1 + .../GTBRegimeBens/GTBRegimeBensSaveData.ts | 7 +- .../GTBTipoLogradouroRemoveData.ts | 7 +- .../GTBTipoLogradouroSaveData.ts | 7 +- .../GTBRegimeComunhaoRemoveData.ts | 1 + .../GTBRegimeComunhaoSaveData.ts | 3 +- .../data/GUsuario/GUsuarioLoginData.ts | 2 +- .../TAtoTipoParte/TAtoTipoParteDeleteData.ts | 3 +- .../TAtoTipoParte/TAtoTipoParteSaveData.ts | 5 +- .../data/TCensec/TCensecDeleteData.ts | 7 +- .../data/TCensec/TCensecSaveData.ts | 3 +- .../TCensecNaturezaLitigioRemoveData.ts | 7 +- .../TCensecNaturezaLitigioSaveData.ts | 7 +- .../TCensecQualidadeDeleteData.ts | 3 +- .../TCensecQualidadeSaveData.ts | 5 +- .../TCensecQualidadeAtoIndexData.ts | 1 + .../TCensecQualidadeAtoRemoveData.ts | 3 +- .../TCensecQualidadeAtoSaveData.ts | 1 + .../TCensecTipoAto/GMedidaTipoRemoveData.ts | 7 +- .../TCensecTipoAto/GMedidaTipoSaveData.ts | 7 +- .../TCensecTipoNaturezaDeleteData.ts | 3 +- .../TCensecTipoNaturezaSaveData.ts | 5 +- .../data/TImovel/TImovelDeleteData.ts | 3 +- .../data/TImovel/TImovelIndexData.ts | 1 + .../data/TImovel/TImovelSaveData.ts | 5 +- .../TImovelUnidadeRuralDeleteData.ts | 4 +- .../TImovelUnidadeRuralSaveData.ts | 2 +- .../TImovelUnidadeUrbanoDeleteData.ts | 2 +- .../TImovelUnidadeUrbanoSaveData.ts | 2 +- .../data/TMinuta/TMinutaRemoveData.ts | 3 +- .../data/TMinuta/TMinutaSaveData.ts | 3 +- .../TPessoaFisica/TPessoaFisicaSaveData.ts | 2 +- .../TPessoaJuridicaRemoveData.ts | 2 +- .../TPessoaJuridicaSaveData.ts | 2 +- .../TPessoaRepresentanteIndexData.ts | 1 + .../TPessoaRepresentanteRemoveData.ts | 3 +- .../TPessoaRepresentanteSaveData.ts | 3 +- .../TTBAndamentoServicoRemoveData.ts | 3 +- .../TTBAndamentoServicoSaveData.ts | 7 +- .../TTBReconhecimentoTipoDeleteData.ts | 3 +- .../TTBReconhecimentoTipoSaveData.ts | 1 + .../hooks/GCidade/useGCidadeReadHook.ts | 5 +- .../hooks/GCidade/useGCidadeRemoveHook.ts | 4 +- .../hooks/GCidade/useGCidadeSaveHook.ts | 3 +- .../GMedidaTipo/useGMedidaTipoReadHook.ts | 4 +- .../GMedidaTipo/useGMedidaTipoRemoveHook.ts | 1 + .../GMedidaTipo/useGMedidaTipoSaveHook.ts | 4 +- .../hooks/GNatureza/useGNaturezaDeleteHook.ts | 4 +- .../hooks/GNatureza/useGNaturezaFormHook.ts | 5 +- .../hooks/GNatureza/useGNaturezaIndexHook.ts | 4 +- .../hooks/GNatureza/useGNaturezaSaveHook.ts | 4 +- .../hooks/GTBBairro/useGTBBairroReadHook.ts | 3 +- .../hooks/GTBBairro/useGTBBairroRemoveHook.ts | 2 +- .../hooks/GTBBairro/useGTBBairroSaveHook.ts | 3 +- .../useGTBEstadoCivilReadHook.ts | 4 +- .../useGTBEstadoCivilRemoveHook.ts | 1 + .../useGTBEstadoCivilSaveHook.ts | 4 +- .../GTBProfissao/useGTBProfissaoReadHook.ts | 3 +- .../GTBProfissao/useGTBProfissaoRemoveHook.ts | 2 +- .../GTBProfissao/useGTBProfissaoSaveHook.ts | 3 +- .../GTBRegimeBens/useGTBRegimeBensReadHook.ts | 4 +- .../useGTBRegimeBensRemoveHook.ts | 3 +- .../GTBRegimeBens/useGTBRegimeBensSaveHook.ts | 6 +- .../useGTBRegimeComunhaoReadHook.ts | 4 +- .../useGTBRegimeComunhaoRemoveHook.ts | 1 + .../useGTBRegimeComunhaoSaveHook.ts | 2 + .../useGTBTipoLogradouroReadHook.ts | 4 +- .../useGTBTipoLogradouroRemoveHook.ts | 1 + .../useGTBTipoLogradouroSaveHook.ts | 4 +- .../hooks/GUF/useGUfReadHook.ts | 3 +- .../hooks/GUsuario/useGUsuarioIndexHook.ts | 4 +- .../hooks/GUsuario/useGUsuarioReadHooks.ts | 4 +- .../hooks/GUsuario/useGUsuarioSaveHook.ts | 4 +- .../useTAtoParteTipoDeleteHook.ts | 4 +- .../TAtoParteTipo/useTAtoParteTipoFormHook.ts | 3 +- .../useTAtoParteTipoIndexHook.ts | 4 +- .../TAtoParteTipo/useTAtoParteTipoSaveHook.ts | 4 +- .../hooks/TCensec/useTCensecDeleteHook.ts | 1 + .../hooks/TCensec/useTCensecReadHook.ts | 6 +- .../hooks/TCensec/useTCensecSaveHook.ts | 4 +- .../useTCensecNaturezaLitigioReadHook.ts | 3 +- .../useTCensecNaturezaLitigioRemoveHook.ts | 5 +- .../useTCensecNaturezaLitigioSaveHook.ts | 3 +- .../useTCensecQualidadeDeleteHook.ts | 4 +- .../useTCensecQualidadeHook.ts | 3 +- .../useTCensecQualidadeIndexHook.ts | 4 +- .../useTCensecQualidadeSaveHook.ts | 4 +- .../useTCensecQualidadeAtoDeleteHook.ts | 1 + .../useTCensecQualidadeAtoFormHook.ts | 3 +- .../useTCensecQualidadeAtoIndexHook.ts | 4 +- .../useTCensecQualidadeAtoSaveHook.ts | 4 +- .../useTCensecTipoAtoReadHook.ts | 4 +- .../useTCensecTipoAtoRemoveHook.ts | 1 + .../useTCensecTipoAtoSaveHook.ts | 4 +- .../useTCensecTipoNaturezaDeleteHook.ts | 4 +- .../useTCensecTipoNaturezaFormHook.ts | 3 +- .../useTCensecTipoNaturezaIndexHook.ts | 4 +- .../useTCensecTipoNaturezaSaveHook.ts | 4 +- .../hooks/TImovel/useTImovelDeleteHook.ts | 4 +- .../hooks/TImovel/useTImovelFormHook.ts | 5 +- .../hooks/TImovel/useTImovelIndexHook.ts | 6 +- .../hooks/TImovel/useTImovelSaveHook.ts | 4 +- .../useTImovelUnidadeRuralDeleteHook.ts | 6 +- .../useTImovelUnidadeRuralFormHook.ts | 3 +- .../useTImovelUnidadeRuralIndexHook.ts | 7 +- .../useTImovelUnidadeRuralSaveHook.ts | 6 +- .../useTImovelUnidadeUrbanoDeleteHook.ts | 6 +- .../useTImovelUnidadeUrbanoFormHook.ts | 3 +- .../useTImovelUnidadeUrbanoIndexHook.ts | 7 +- .../useTImovelUnidadeUrbanoSaveHook.ts | 6 +- .../hooks/TMinuta/useTMinutaIndexHook.ts | 3 +- .../hooks/TMinuta/useTMinutaReadHook.ts | 3 +- .../hooks/TMinuta/useTMinutaRemoveHook.ts | 2 +- .../hooks/TMinuta/useTMinutaSaveHook.ts | 3 +- .../useTPessoaFisicaDeleteHook.ts | 2 +- .../TPessoaFisica/useTPessoaFisicaFormHook.ts | 3 +- .../useTPessoaFisicaIndexHook.ts | 6 +- .../TPessoaFisica/useTPessoaFisicaSaveHook.ts | 6 +- .../useTPessoaJuridicaDeleteHook.ts | 2 +- .../useTPessoaJuridicaFormHook.ts | 3 +- .../useTPessoaJuridicaIndexHook.ts | 6 +- .../useTPessoaJuridicaSaveHook.ts | 6 +- .../useTPessoaRepresentanteDeleteHook.ts | 1 + .../useTPessoaRepresentanteFormHook.ts | 3 +- .../useTPessoaRepresentanteIndexHook.ts | 4 +- .../useTPessoaRepresentanteSaveHook.ts | 4 +- .../useTTBAndamentoServicoDeleteHook.ts | 5 +- .../useTTBAndamentoServicoReadHook.ts | 5 +- .../useTTBAndamentoServicoSaveHook.ts | 5 +- .../useTTBReconhecimentoTipoDeleteHook.ts | 4 +- .../useTTBReconhecimentoTipoReadHook.ts | 5 +- .../useTTBReconhecimentoTipoSaveHook.ts | 5 +- .../TImovelUnidadeRural.ts | 1 + .../TCensecQualdiadeSchema.ts | 3 +- .../TImovelUnidadeRuralSchema.ts | 4 +- .../TImovelUnidadeUrbanoSchema.ts | 1 + .../schemas/TPessoa/TPessoaFisicaSchema.ts | 3 +- .../schemas/TPessoa/TPessoaJuridicaSchema.ts | 3 +- .../services/GCidade/GCidadeRemoveService.ts | 2 +- .../services/GCidade/GCidadeSaveService.ts | 2 +- .../GMedidaTipo/GMedidaTipoRemoveService.ts | 1 + .../GMedidaTipo/GMedidaTipoSaveService.ts | 1 + .../GNatureza/GNaturezaDeleteService.ts | 1 + .../GNatureza/GNaturezaIndexService.ts | 1 + .../GNatureza/GNaturezaSaveService.ts | 1 + .../GTBBairro/GTBBairroRemoveService.ts | 2 +- .../GTBBairro/GTBBairroSaveService.ts | 2 +- .../GTBEstadoCivilRemoveService.ts | 1 + .../GTBEstadoCivilSaveService.ts | 1 + .../GTBRegimeComunhaoRemoveService.ts | 1 + .../GTBRegimeComunhaoSaveService.ts | 1 + .../GTBTipoLogradouroRemoveService.ts | 1 + .../GTBTipoLogradouroSaveService.ts | 1 + .../services/GUsuario/GUsuarioLogin.ts | 2 +- .../GUsuario/GUsuarioLogoutService.ts | 1 - .../TAtoParteTipoDeleteService.ts | 3 +- .../TAtoParteTipo/TAtoParteTipoSaveService.ts | 3 +- .../services/TCensec/TCensecDeleteService.ts | 1 + .../services/TCensec/TCensecSaveService.ts | 1 + .../TCensecNaturezaLitigioRemoveService.ts | 3 +- .../TCensecNaturezaLitigioSaveService.ts | 1 + .../TCensecQualidadeDeleteService.ts | 3 +- .../TCensecQualidadeSaveService.ts | 3 +- .../TCensecQualidadeAtoIndexService.ts | 1 + .../TCensecQualidadeAtoRemoveService.ts | 1 + .../TCensecQualidadeAtoSaveService.ts | 1 + .../TCensecTipoAtoRemoveService.ts | 1 + .../TCensecTipoAtoSaveService.ts | 1 + .../TCensecTipoNaturezaDeleteService.ts | 3 +- .../TCensecTipoNaturezaSaveService.ts | 3 +- .../services/TImovel/TImovelDeleteService.ts | 1 + .../services/TImovel/TImovelIndexService.ts | 1 + .../services/TImovel/TImovelSaveService.ts | 1 + .../TImovelUnidadeRuralDeleteService.ts | 2 +- .../TImovelUnidadeRuralIndexService.ts | 2 +- .../TImovelUnidadeRuralSaveService.ts | 2 +- .../TImovelUnidadeUrbanoDeleteService.ts | 4 +- .../TImovelUnidadeUrbanoIndexService.ts | 2 +- .../TImovelUnidadeUrbanoSaveService.ts | 2 +- .../TPessoaFisicaRemoveService.ts | 2 +- .../TPessoaFisica/TPessoaFisicaSaveService.ts | 2 +- .../TPessoaJuridicaRemoveService.ts | 2 +- .../TPessoaJuridicaSaveService.ts | 2 +- .../TPessoaRepresentanteIndexService.ts | 1 + .../TPessoaRepresentanteRemoveService.ts | 1 + .../TPessoaRepresentanteSaveService.ts | 1 + src/shared/actions/form/ResetFormIfData.ts | 1 + .../confirmacao/ConfirmacaoSelect.tsx | 7 +- src/shared/components/dataTable/DataTable.tsx | 8 +- .../components/dataTable/SortableHeader.tsx | 3 +- src/shared/components/loading/loading.tsx | 1 + .../loadingButton/LoadingButton.tsx | 8 +- src/shared/components/response/response.tsx | 3 +- .../components/situacoes/SituacoesSelect.tsx | 7 +- src/shared/components/structure/Header.tsx | 3 +- .../tipoAtoAnterior/TipoAtoAnteriorSelect.tsx | 7 +- .../tipoDaParte/TipoDaParteSelect.tsx | 5 +- .../tipoNatureza/TipoNaturezaSelect.tsx | 7 +- .../hooks/auth/useGUsuarioGetJWTHook.ts | 7 +- src/shared/services/api/Api.ts | 6 +- src/shared/services/api/schemas/ApiSchema.ts | 2 +- 310 files changed, 1460 insertions(+), 700 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0c872b6..b754e85 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -6,20 +6,11 @@ import importPlugin from "eslint-plugin-import"; import tseslint from "typescript-eslint"; export default [ - // Configuração base JavaScript js.configs.recommended, - - // Configurações recomendadas para TypeScript ...tseslint.configs.recommended, - { files: ["**/*.ts", "**/*.tsx"], - ignores: [ - "node_modules/**", - ".next/**", - "out/**", - "dist/**" - ], + ignores: ["node_modules/**", ".next/**", "out/**", "dist/**"], languageOptions: { ecmaVersion: "latest", sourceType: "module", @@ -41,21 +32,21 @@ export default [ settings: { react: { version: "detect" }, "import/resolver": { - node: { extensions: [".js", ".jsx", ".ts", ".tsx"] }, - typescript: {}, + typescript: { + alwaysTryTypes: true, + project: "./tsconfig.json", + }, + node: { + extensions: [".js", ".jsx", ".ts", ".tsx"], + }, }, }, rules: { - /* React */ "react/react-in-jsx-scope": "off", "react/jsx-uses-react": "off", "react/jsx-uses-vars": "warn", - - /* Hooks */ "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", - - /* Importação e organização */ "import/order": [ "error", { @@ -77,8 +68,6 @@ export default [ ], "import/no-duplicates": "error", "import/newline-after-import": ["error", { count: 1 }], - - /* Gerais */ "no-unused-vars": "warn", }, }, diff --git a/next.config.ts b/next.config.ts index cc483e1..0ef2744 100644 --- a/next.config.ts +++ b/next.config.ts @@ -3,6 +3,10 @@ import type { NextConfig } from 'next'; const nextConfig: NextConfig = { // Isso gera um diretório otimizado que inclui tudo o que a aplicação precisa para rodar output: 'standalone', + eslint: { + // Desativa a verificação de lint durante o build + ignoreDuringBuilds: true, + }, }; export default nextConfig; diff --git a/package-lock.json b/package-lock.json index bf13b5f..fa8c604 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,6 +58,7 @@ "@typescript-eslint/parser": "^8.46.1", "eslint": "^9.38.0", "eslint-config-prettier": "^10.1.8", + "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-prettier": "^5.5.4", @@ -68,7 +69,8 @@ "prettier-plugin-tailwindcss": "^0.6.14", "tailwindcss": "^4", "tw-animate-css": "^1.3.7", - "typescript": "5.9.3" + "typescript": "5.9.3", + "typescript-eslint": "^8.46.1" } }, "node_modules/@alloc/quick-lru": { @@ -3023,6 +3025,275 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", + "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", + "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", + "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", + "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", + "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", + "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", + "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", + "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", + "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", + "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", + "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", + "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", + "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", + "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", + "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", + "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.11" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", + "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", + "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", + "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -4108,6 +4379,31 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-import-context": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz", + "integrity": "sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-tsconfig": "^4.10.1", + "stable-hash-x": "^0.2.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-context" + }, + "peerDependencies": { + "unrs-resolver": "^1.0.0" + }, + "peerDependenciesMeta": { + "unrs-resolver": { + "optional": true + } + } + }, "node_modules/eslint-import-resolver-node": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", @@ -4130,6 +4426,41 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.4.tgz", + "integrity": "sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==", + "dev": true, + "license": "ISC", + "dependencies": { + "debug": "^4.4.1", + "eslint-import-context": "^0.1.8", + "get-tsconfig": "^4.10.1", + "is-bun-module": "^2.0.0", + "stable-hash-x": "^0.2.0", + "tinyglobby": "^0.2.14", + "unrs-resolver": "^1.7.11" + }, + "engines": { + "node": "^16.17.0 || >=18.6.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-resolver-typescript" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, "node_modules/eslint-module-utils": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", @@ -4877,6 +5208,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.12.0.tgz", + "integrity": "sha512-LScr2aNr2FbjAjZh2C6X6BxRx1/x+aTDExct/xyq2XKbYOiG5c0aK7pMsSuyc0brz3ibr/lbQiHD9jzt4lccJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -5191,6 +5535,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-bun-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", + "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.7.1" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -6200,6 +6554,22 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-postinstall": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", + "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", + "dev": true, + "license": "MIT", + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -6953,6 +7323,16 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", @@ -7291,6 +7671,16 @@ "node": ">=0.10.0" } }, + "node_modules/stable-hash-x": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz", + "integrity": "sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", @@ -7554,6 +7944,54 @@ "node": ">=18" } }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tinymce": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-8.1.2.tgz", @@ -7720,6 +8158,30 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.46.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.1.tgz", + "integrity": "sha512-VHgijW803JafdSsDO8I761r3SHrgk4T00IdyQ+/UsthtgPRsBWQLqoSxOolxTpxRKi1kGXK0bSz4CoAc9ObqJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.46.1", + "@typescript-eslint/parser": "8.46.1", + "@typescript-eslint/typescript-estree": "8.46.1", + "@typescript-eslint/utils": "8.46.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", @@ -7746,6 +8208,41 @@ "dev": true, "license": "MIT" }, + "node_modules/unrs-resolver": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", + "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.3.0" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-android-arm-eabi": "1.11.1", + "@unrs/resolver-binding-android-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-x64": "1.11.1", + "@unrs/resolver-binding-freebsd-x64": "1.11.1", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", + "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-musl": "1.11.1", + "@unrs/resolver-binding-wasm32-wasi": "1.11.1", + "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", + "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", + "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" + } + }, "node_modules/update-browserslist-db": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", diff --git a/package.json b/package.json index 460ae38..f0749ee 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@typescript-eslint/parser": "^8.46.1", "eslint": "^9.38.0", "eslint-config-prettier": "^10.1.8", + "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-prettier": "^5.5.4", @@ -70,6 +71,7 @@ "prettier-plugin-tailwindcss": "^0.6.14", "tailwindcss": "^4", "tw-animate-css": "^1.3.7", - "typescript": "5.9.3" + "typescript": "5.9.3", + "typescript-eslint": "^8.46.1" } } diff --git a/src/packages/administrativo/components/GCidade/GCidadeForm.tsx b/src/packages/administrativo/components/GCidade/GCidadeForm.tsx index d12962a..b455abc 100644 --- a/src/packages/administrativo/components/GCidade/GCidadeForm.tsx +++ b/src/packages/administrativo/components/GCidade/GCidadeForm.tsx @@ -1,8 +1,9 @@ 'use client'; -import z from 'zod'; -import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useEffect } from 'react'; +import { useForm } from 'react-hook-form'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { @@ -23,12 +24,6 @@ import { FormMessage, } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; - -import { GCidadeSchema } from '../../schemas/GCidade/GCidadeSchema'; -import { useEffect } from 'react'; - -// Hook responsável em trazer todos os estados brasileiros -import { useGUfReadHook } from '@/packages/administrativo/hooks/GUF/useGUfReadHook'; import { Select, SelectContent, @@ -36,6 +31,12 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select'; +import { useGUfReadHook } from '@/packages/administrativo/hooks/GUF/useGUfReadHook'; + +import { GCidadeSchema } from '../../schemas/GCidade/GCidadeSchema'; + + +// Hook responsável em trazer todos os estados brasileiros // Define o tipo do formulário com base no schema Zod type FormValues = z.infer; diff --git a/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx b/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx index 053e146..1b71bf7 100644 --- a/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx +++ b/src/packages/administrativo/components/GCidade/GCidadeIndex.tsx @@ -1,20 +1,17 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; - -import Loading from '@/shared/components/loading/loading'; -import GCidadeTable from '@/packages/administrativo/components/GCidade/GCidadeTable'; import GCidadeForm from '@/packages/administrativo/components/GCidade/GCidadeForm'; - +import GCidadeTable from '@/packages/administrativo/components/GCidade/GCidadeTable'; import { useGCidadeReadHook } from '@/packages/administrativo/hooks/GCidade/useGCidadeReadHook'; -import { useGCidadeSaveHook } from '@/packages/administrativo/hooks/GCidade/useGCidadeSaveHook'; import { useGCidadeRemoveHook } from '@/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook'; - +import { useGCidadeSaveHook } from '@/packages/administrativo/hooks/GCidade/useGCidadeSaveHook'; +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; export default function GCidadeIndex() { diff --git a/src/packages/administrativo/components/GCidade/GCidadeTable.tsx b/src/packages/administrativo/components/GCidade/GCidadeTable.tsx index e1675b0..a8afe85 100644 --- a/src/packages/administrativo/components/GCidade/GCidadeTable.tsx +++ b/src/packages/administrativo/components/GCidade/GCidadeTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -18,7 +20,6 @@ import { TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import GCidadeInterface from '../../interfaces/GCidade/GCidadeInterface'; // Tipagem das props do componente da tabela diff --git a/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoForm.tsx b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoForm.tsx index a879486..8f87c16 100644 --- a/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoForm.tsx +++ b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoForm.tsx @@ -1,9 +1,9 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { @@ -25,8 +25,9 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; -import { GMedidaTipoSchema } from '../../schemas/GMedidaTipo/GMedidaTipoSchema'; + import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; +import { GMedidaTipoSchema } from '../../schemas/GMedidaTipo/GMedidaTipoSchema'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex.tsx b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex.tsx index b4d7889..9d04acf 100644 --- a/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex.tsx +++ b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoIndex.tsx @@ -1,23 +1,23 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import { useResponse } from '@/shared/components/response/ResponseContext'; - -import Header from '@/shared/components/structure/Header'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import Loading from '@/shared/components/loading/loading'; -import GMedidaTipoTable from './GMedidaTipoTable'; -import GMedidaTipoForm from './GMedidaTipoForm'; - -import { useGMedidaTipoReadHook } from '../../hooks/GMedidaTipo/useGMedidaTipoReadHook'; -import { useGMedidaTipoSaveHook } from '../../hooks/GMedidaTipo/useGMedidaTipoSaveHook'; -import { useGMedidaTipoRemoveHook } from '../../hooks/GMedidaTipo/useGMedidaTipoRemoveHook'; - -import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import Header from '@/shared/components/structure/Header'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import GMedidaTipoForm from './GMedidaTipoForm'; +import GMedidaTipoTable from './GMedidaTipoTable'; +import { useGMedidaTipoReadHook } from '../../hooks/GMedidaTipo/useGMedidaTipoReadHook'; +import { useGMedidaTipoRemoveHook } from '../../hooks/GMedidaTipo/useGMedidaTipoRemoveHook'; +import { useGMedidaTipoSaveHook } from '../../hooks/GMedidaTipo/useGMedidaTipoSaveHook'; +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; + + const initialMedidaTipo: GMedidaTipoInterface = { medida_tipo_id: 0, sigla: '', diff --git a/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoTable.tsx b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoTable.tsx index 8184d50..2e4d283 100644 --- a/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoTable.tsx +++ b/src/packages/administrativo/components/GMedidaTipo/GMedidaTipoTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -17,7 +19,7 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; interface GMedidaTipoTableProps { diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx index fb89c15..dcfcaa6 100644 --- a/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx +++ b/src/packages/administrativo/components/GNatureza/GNaturezaColumns.tsx @@ -1,6 +1,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import { Button } from '@/components/ui/button'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -9,8 +10,9 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; + import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; export default function GNaturezaColumns( diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx index efe4212..39318fa 100644 --- a/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx +++ b/src/packages/administrativo/components/GNatureza/GNaturezaForm.tsx @@ -1,6 +1,7 @@ 'use client'; import React, { useEffect } from 'react'; + import { Button } from '@/components/ui/button'; import { Dialog, @@ -21,12 +22,12 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Switch } from '@/components/ui/switch'; - -import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; + import { useGNaturezaFormHook } from '../../hooks/GNatureza/useGNaturezaFormHook'; import { GNaturezaFormInterface } from '../../interfaces/GNatureza/GNaturezaFormInterface'; -import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; /** * Formulário de cadastro/edição de Natureza diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaIndex.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaIndex.tsx index e8224bc..55940a9 100644 --- a/src/packages/administrativo/components/GNatureza/GNaturezaIndex.tsx +++ b/src/packages/administrativo/components/GNatureza/GNaturezaIndex.tsx @@ -2,19 +2,18 @@ import { useEffect, useState, useCallback } from 'react'; -import Loading from '@/shared/components/loading/loading'; +import { useGNaturezaDeleteHook } from '@/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook'; import { useGNaturezaIndexHook } from '@/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook'; import { useGNaturezaSaveHook } from '@/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook'; -import { useGNaturezaDeleteHook } from '@/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook'; - +import GNaturezaInterface from '@/packages/administrativo/interfaces/GNatureza/GNaturezaInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import GNaturezaInterface from '@/packages/administrativo/interfaces/GNatureza/GNaturezaInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; -import GNaturezaTable from './GNaturezaTable'; + import GNaturezaForm from './GNaturezaForm'; +import GNaturezaTable from './GNaturezaTable'; import { GNaturezaIndexInterface } from '../../interfaces/GNatureza/GNaturezaIndexInterface'; export default function GNaturezaIndex({ sistema_id }: GNaturezaIndexInterface) { diff --git a/src/packages/administrativo/components/GNatureza/GNaturezaTable.tsx b/src/packages/administrativo/components/GNatureza/GNaturezaTable.tsx index 65adee6..7fe3d76 100644 --- a/src/packages/administrativo/components/GNatureza/GNaturezaTable.tsx +++ b/src/packages/administrativo/components/GNatureza/GNaturezaTable.tsx @@ -1,6 +1,7 @@ 'use client'; import { DataTable } from '@/shared/components/dataTable/DataTable'; + import GNaturezaColumns from './GNaturezaColumns'; import GNaturezaTableInterface from '../../interfaces/GNatureza/GNaturezaTableInterface'; diff --git a/src/packages/administrativo/components/GTBBairro/GTBBairroForm.tsx b/src/packages/administrativo/components/GTBBairro/GTBBairroForm.tsx index eab8f97..8a9891d 100644 --- a/src/packages/administrativo/components/GTBBairro/GTBBairroForm.tsx +++ b/src/packages/administrativo/components/GTBBairro/GTBBairroForm.tsx @@ -1,9 +1,9 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; @@ -26,11 +26,11 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import { GTBBairroSchema } from '../../schemas/GTBBairro/GTBBairroSchema'; -import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; -import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; -import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/GTBBairro/GTBBairroIndex.tsx b/src/packages/administrativo/components/GTBBairro/GTBBairroIndex.tsx index c33766a..5a6528a 100644 --- a/src/packages/administrativo/components/GTBBairro/GTBBairroIndex.tsx +++ b/src/packages/administrativo/components/GTBBairro/GTBBairroIndex.tsx @@ -1,23 +1,23 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import { useResponse } from '@/shared/components/response/ResponseContext'; - -import Header from '@/shared/components/structure/Header'; -import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; -import Loading from '@/shared/components/loading/loading'; -import GTBBairroTable from './GTBBairroTable'; -import GTBBairroForm from './GTBBairroForm'; - import { useGTBBairroReadHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook'; -import { useGTBBairroSaveHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook'; import { useGTBBairroRemoveHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook'; - -import { GTBBairroInterface } from '../../interfaces/GTBBairro/GTBBairroInterface'; +import { useGTBBairroSaveHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import Header from '@/shared/components/structure/Header'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import GTBBairroForm from './GTBBairroForm'; +import GTBBairroTable from './GTBBairroTable'; +import { GTBBairroInterface } from '../../interfaces/GTBBairro/GTBBairroInterface'; + + const initialBairro: GTBBairroInterface = { sistema_id: null, tb_bairro_id: 0, diff --git a/src/packages/administrativo/components/GTBBairro/GTBBairroSelect.tsx b/src/packages/administrativo/components/GTBBairro/GTBBairroSelect.tsx index dc291b8..2ac746e 100644 --- a/src/packages/administrativo/components/GTBBairro/GTBBairroSelect.tsx +++ b/src/packages/administrativo/components/GTBBairro/GTBBairroSelect.tsx @@ -1,6 +1,8 @@ 'use client'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; import React, { useState, useEffect, useCallback, useMemo } from 'react'; + import { Button } from '@/components/ui/button'; import { Command, @@ -13,9 +15,9 @@ import { import { FormControl } from '@/components/ui/form'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; -import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; -import GetCapitalize from '@/shared/actions/text/GetCapitalize'; import { useGTBBairroReadHook } from '@/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; + import GTBairroSelectInterface from '../../interfaces/GTBBairro/GTBairroSelectInterface'; export default function GTBBairroSelect({ field }: GTBairroSelectInterface) { diff --git a/src/packages/administrativo/components/GTBBairro/GTBBairroTable.tsx b/src/packages/administrativo/components/GTBBairro/GTBBairroTable.tsx index 57d1b3e..c4f3454 100644 --- a/src/packages/administrativo/components/GTBBairro/GTBBairroTable.tsx +++ b/src/packages/administrativo/components/GTBBairro/GTBBairroTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -17,10 +19,11 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import { GTBBairroInterface } from '../../interfaces/GTBBairro/GTBBairroInterface'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import { GTBBairroInterface } from '../../interfaces/GTBBairro/GTBBairroInterface'; + + interface GTBBairroTableProps { data: GTBBairroInterface[]; onEdit: (item: GTBBairroInterface, isEditingFormStatus: boolean) => void; diff --git a/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilForm.tsx b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilForm.tsx index be770fc..004e6da 100644 --- a/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilForm.tsx +++ b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilForm.tsx @@ -1,11 +1,10 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; -import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; import { @@ -27,9 +26,10 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; -import { GTBEstadoCivilSchema } from '../../schemas/GTBEstadoCivil/GTBEstadoCivilSchema'; import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; +import { GTBEstadoCivilSchema } from '../../schemas/GTBEstadoCivil/GTBEstadoCivilSchema'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex.tsx b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex.tsx index ab233c6..2ea7bc3 100644 --- a/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex.tsx +++ b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilIndex.tsx @@ -1,21 +1,21 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import Header from '@/shared/components/structure/Header'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import Loading from '@/shared/components/loading/loading'; -import GTBEstadoCivilTable from './GTBEstadoCivilTable'; -import GTBEstadoCivilForm from './GTBEstadoCivilForm'; - -import { useGTBEstadoCivilReadHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook'; -import { useGTBEstadoCivilSaveHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook'; -import { useGTBEstadoCivilRemoveHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook'; - -import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; import { useResponse } from '@/shared/components/response/ResponseContext'; +import Header from '@/shared/components/structure/Header'; + +import GTBEstadoCivilForm from './GTBEstadoCivilForm'; +import GTBEstadoCivilTable from './GTBEstadoCivilTable'; +import { useGTBEstadoCivilReadHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook'; +import { useGTBEstadoCivilRemoveHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook'; +import { useGTBEstadoCivilSaveHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook'; +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; + const initalEstadoCivil: GTBEstadoCivilInterface = { tb_estadocivil_id: 0, diff --git a/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilTable.tsx b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilTable.tsx index c992568..d640338 100644 --- a/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilTable.tsx +++ b/src/packages/administrativo/components/GTBEstadoCivil/GTBEstadoCivilTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -17,7 +19,7 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; interface TBEstadoCivilTableProps { diff --git a/src/packages/administrativo/components/GTBProfissao/GTBProfissaoForm.tsx b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoForm.tsx index b343951..cc56885 100644 --- a/src/packages/administrativo/components/GTBProfissao/GTBProfissaoForm.tsx +++ b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoForm.tsx @@ -1,9 +1,9 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; diff --git a/src/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex.tsx b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex.tsx index 8b806e4..bcc1687 100644 --- a/src/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex.tsx +++ b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoIndex.tsx @@ -1,22 +1,20 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; - -import Loading from '@/shared/components/loading/loading'; -import GTBProfissaoTable from './GTBProfissaoTable'; -import GTBProfissaoForm from './GTBProfissaoForm'; - import { useGTBProfissaoReadHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook'; -import { useGTBProfissaoSaveHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook'; import { useGTBProfissaoRemoveHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook'; - +import { useGTBProfissaoSaveHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import GTBProfissaoInterface from '../../interfaces/GTBProfissao/GTBProfissaoInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; +import GTBProfissaoForm from './GTBProfissaoForm'; +import GTBProfissaoTable from './GTBProfissaoTable'; +import GTBProfissaoInterface from '../../interfaces/GTBProfissao/GTBProfissaoInterface'; + export default function GTBProfissaoIndex() { // Hooks para leitura e salvamento const { gTBProfissao, fetchGTBProfissao } = useGTBProfissaoReadHook(); diff --git a/src/packages/administrativo/components/GTBProfissao/GTBProfissaoTable.tsx b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoTable.tsx index 2b525b9..14cf8b5 100644 --- a/src/packages/administrativo/components/GTBProfissao/GTBProfissaoTable.tsx +++ b/src/packages/administrativo/components/GTBProfissao/GTBProfissaoTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -18,7 +20,6 @@ import { TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import GTBProfissaoInterface from '../../interfaces/GTBProfissao/GTBProfissaoInterface'; interface GTBProfissaoTableProps { diff --git a/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm.tsx b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm.tsx index 0abe758..5808300 100644 --- a/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm.tsx +++ b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm.tsx @@ -1,8 +1,9 @@ 'use client'; -import z from 'zod'; -import { useForm, Controller } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useEffect } from 'react'; +import { useForm, Controller } from 'react-hook-form'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; @@ -25,9 +26,8 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; - import { GTBRegimeBensSchema } from '@/packages/administrativo/schemas/GTBRegimeBens/GTBRegimeBensSchema'; -import { useEffect } from 'react'; + type FormValues = z.infer; diff --git a/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex.tsx b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex.tsx index 917741b..2fc2707 100644 --- a/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex.tsx +++ b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensIndex.tsx @@ -1,22 +1,20 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; - -import Loading from '@/shared/components/loading/loading'; -import GTBRegimeBensTable from '@/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable'; import GTBRegimeBensForm from '@/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensForm'; - -import { useGTBRegimeBensReadHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensReadHook'; -import { useGTBRegimeBensSaveHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensSaveHook'; -import { useGTBRegimeBensRemoveHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook'; - +import GTBRegimeBensTable from '@/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; +import { useGTBRegimeBensReadHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensReadHook'; +import { useGTBRegimeBensRemoveHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook'; +import { useGTBRegimeBensSaveHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensSaveHook'; +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; + export default function GTBRegimeBensIndex() { // Hooks para leitura e salvamento const { gTBRegimeBens, fetchGTBRegimeBens } = useGTBRegimeBensReadHook(); diff --git a/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable.tsx b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable.tsx index e0914dd..8cbf6a7 100644 --- a/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable.tsx +++ b/src/packages/administrativo/components/GTBRegimeBens/GTBRegimeBensTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -17,8 +19,6 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; - -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import GTBRegimeBensInterface from '@/packages/administrativo/interfaces/GTBRegimeBens/GTBRegimeBensInterface'; interface GTBRegimeBensTableProps { diff --git a/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoForm.tsx b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoForm.tsx index 638222e..8d8261b 100644 --- a/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoForm.tsx +++ b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoForm.tsx @@ -1,9 +1,9 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; @@ -26,8 +26,6 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; - -import { GTBRegimeComunhaoSchema } from '../../schemas/GTBRegimeComunhao/GTBRegimeComunhaoSchema'; import { Select, SelectContent, @@ -35,7 +33,9 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select'; + import { useGTBRegimeBensReadHook } from '../../hooks/GTBRegimeBens/useGTBRegimeBensReadHook'; +import { GTBRegimeComunhaoSchema } from '../../schemas/GTBRegimeComunhao/GTBRegimeComunhaoSchema'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex.tsx b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex.tsx index 5bcd85c..547cdc1 100644 --- a/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex.tsx +++ b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoIndex.tsx @@ -1,22 +1,21 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; - -import Loading from '@/shared/components/loading/loading'; -import GTBRegimeComunhaoTable from './GTBRegimeComunhaoTable'; -import GTBRegimeComunhaoForm from './GTBRegimeComunhaoForm'; - -import { useGTBRegimeComunhaoReadHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook'; -import { useGTBRegimeComunhaoSaveHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook'; -import { useGTBRegimeComunhaoRemoveHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook'; - import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; +import GTBRegimeComunhaoForm from './GTBRegimeComunhaoForm'; +import GTBRegimeComunhaoTable from './GTBRegimeComunhaoTable'; +import { useGTBRegimeComunhaoReadHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook'; +import { useGTBRegimeComunhaoRemoveHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook'; +import { useGTBRegimeComunhaoSaveHook } from '../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; + + export default function GTBRegimeComunhaoIndex() { // Hooks para leitura e salvamento const { gTBRegimeComunhao, fetchGTBRegimeComunhao } = useGTBRegimeComunhaoReadHook(); diff --git a/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoTable.tsx b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoTable.tsx index 299b6c8..bdc5d89 100644 --- a/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoTable.tsx +++ b/src/packages/administrativo/components/GTBRegimeComunhao/GTBRegimeComunhaoTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -18,7 +20,6 @@ import { TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; interface GTBRegimeComunhaoTableProps { diff --git a/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroForm.tsx b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroForm.tsx index 3fbf79a..ff2eb8e 100644 --- a/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroForm.tsx +++ b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroForm.tsx @@ -1,9 +1,9 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; @@ -26,11 +26,10 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; - import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; -import { GTBTipoLogradouroSchema } from '../../schemas/GTBTipoLogradouro/GTBTipoLogradouroSchema'; import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; +import { GTBTipoLogradouroSchema } from '../../schemas/GTBTipoLogradouro/GTBTipoLogradouroSchema'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex.tsx b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex.tsx index fe6a770..72f790d 100644 --- a/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex.tsx +++ b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroIndex.tsx @@ -1,22 +1,21 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import Header from '@/shared/components/structure/Header'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import Loading from '@/shared/components/loading/loading'; -import GTBTipoLogradouroTable from './GTBTipoLogradouroTable'; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import Header from '@/shared/components/structure/Header'; + import GTBTipoLogradouroForm from './GTBTipoLogradouroForm'; - +import GTBTipoLogradouroTable from './GTBTipoLogradouroTable'; import { useGTBTipoLogradouroReadHook } from '../../hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook'; -import { useGTBTipoLogradouroSaveHook } from '../../hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook'; import { useGTBTipoLogradouroRemoveHook } from '../../hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook'; - +import { useGTBTipoLogradouroSaveHook } from '../../hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook'; import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; -import { useResponse } from '@/shared/components/response/ResponseContext'; export default function GTBTipoLogradouroIndex() { // Controle de exibição de respostas diff --git a/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroTable.tsx b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroTable.tsx index cf69a83..8d37671 100644 --- a/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroTable.tsx +++ b/src/packages/administrativo/components/GTBTipoLogradouro/GTBTipoLogradouroTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -17,7 +19,7 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; interface GTBTipoLogradouroTableProps { diff --git a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx index 215bcf6..494b7d0 100644 --- a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoColumns.tsx @@ -1,7 +1,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; -import { Button } from '@/components/ui/button'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -10,12 +10,14 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; -import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import { TipoDaParteEnum } from '@/shared/enums/TIpoDaParteEnum'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; + export default function TAtoParteTipoColumns( onEdit: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void, onDelete: (item: TAtoParteTipoInterface, isEditingFormStatus: boolean) => void, diff --git a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx index 87d8241..10f742d 100644 --- a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoForm.tsx @@ -21,16 +21,16 @@ import { 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 { useTAtoParteTipoFormHook } from '../../hooks/TAtoParteTipo/useTAtoParteTipoFormHook'; -import { TAtoParteTipoFormInterface } from '../../interfaces/TAtoParteTipo/TAtoParteTipoFormInterface'; import { Switch } from '@/components/ui/switch'; import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; -import TCensecQualidadeSelect from '../TCensecQualidade/TCensecQualidadeSelect'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import TipoDaParteSelect from '@/shared/components/tipoDaParte/TipoDaParteSelect'; +import { useTAtoParteTipoFormHook } from '../../hooks/TAtoParteTipo/useTAtoParteTipoFormHook'; +import { TAtoParteTipoFormInterface } from '../../interfaces/TAtoParteTipo/TAtoParteTipoFormInterface'; +import TCensecQualidadeSelect from '../TCensecQualidade/TCensecQualidadeSelect'; + export default function TAtoParteTipoForm({ isOpen, data, diff --git a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex.tsx index 18c9888..5ef0c11 100644 --- a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex.tsx +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoIndex.tsx @@ -2,19 +2,18 @@ import { useEffect, useState, useCallback } from 'react'; -import Loading from '@/shared/components/loading/loading'; +import { useTAtoParteTipoDeleteHook } from '@/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook'; import { useTAtoParteTipoIndexHook } from '@/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook'; import { useTAtoParteTipoSaveHook } from '@/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook'; -import { useTAtoParteTipoDeleteHook } from '@/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook'; - +import TAtoParteTipoInterface from '@/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TAtoParteTipoInterface from '@/packages/administrativo/interfaces/TAtoParteTipo/TAtoParteTipoInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; -import TAtoParteTipoTable from './TAtoParteTipoTable'; + import TAtoParteTipoForm from './TAtoParteTipoForm'; +import TAtoParteTipoTable from './TAtoParteTipoTable'; export default function TAtoParteTipoIndex() { // Controle de estado do botão diff --git a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoTable.tsx b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoTable.tsx index 66e33b0..0fc9e85 100644 --- a/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoTable.tsx +++ b/src/packages/administrativo/components/TAtoParteTipo/TAtoParteTipoTable.tsx @@ -1,6 +1,7 @@ 'use client'; import { DataTable } from '@/shared/components/dataTable/DataTable'; + import TAtoParteTipoColumns from './TAtoParteTipoColumns'; import TAtoParteTipoTableInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoTableInterface'; diff --git a/src/packages/administrativo/components/TCensec/TCensecForm.tsx b/src/packages/administrativo/components/TCensec/TCensecForm.tsx index 66dd4d4..7fc38f5 100644 --- a/src/packages/administrativo/components/TCensec/TCensecForm.tsx +++ b/src/packages/administrativo/components/TCensec/TCensecForm.tsx @@ -1,9 +1,9 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; @@ -26,10 +26,9 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; - import { TCensecSchema } from '@/packages/administrativo/schemas/TCensec/TCensecSchema'; -import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/TCensec/TCensecIndex.tsx b/src/packages/administrativo/components/TCensec/TCensecIndex.tsx index 17f531d..3074935 100644 --- a/src/packages/administrativo/components/TCensec/TCensecIndex.tsx +++ b/src/packages/administrativo/components/TCensec/TCensecIndex.tsx @@ -1,22 +1,21 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; - -import Loading from '@/shared/components/loading/loading'; -import TCensecTable from './TCensecTable'; -import TCensecForm from './TCensecForm'; - -import { useTCensecReadHook } from '../../hooks/TCensec/useTCensecReadHook'; -import { useTCensecSaveHook } from '../../hooks/TCensec/useTCensecSaveHook'; -import { useTCensecDeleteHook } from '../../hooks/TCensec/useTCensecDeleteHook'; - import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; +import TCensecForm from './TCensecForm'; +import TCensecTable from './TCensecTable'; +import { useTCensecDeleteHook } from '../../hooks/TCensec/useTCensecDeleteHook'; +import { useTCensecReadHook } from '../../hooks/TCensec/useTCensecReadHook'; +import { useTCensecSaveHook } from '../../hooks/TCensec/useTCensecSaveHook'; +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; + + export default function TCensecIndex() { // Controle de estado do botão const [buttonIsLoading, setButtonIsLoading] = useState(false); diff --git a/src/packages/administrativo/components/TCensec/TCensecTable.tsx b/src/packages/administrativo/components/TCensec/TCensecTable.tsx index 3600d80..8040188 100644 --- a/src/packages/administrativo/components/TCensec/TCensecTable.tsx +++ b/src/packages/administrativo/components/TCensec/TCensecTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -17,8 +19,6 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; - -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import TCensecInterface from '@/packages/administrativo/interfaces/TCensec//TCensecInterface'; interface TCensecTableProps { diff --git a/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioForm.tsx b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioForm.tsx index 7142a5d..de07846 100644 --- a/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioForm.tsx +++ b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioForm.tsx @@ -1,11 +1,10 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; -import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; import { @@ -27,10 +26,10 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; - import { TCensecNaturezaLitigioSchema } from '@/packages/administrativo/schemas/TCensecNaturezaLitigio/TCensecNaturezaLitigioSchema'; -import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex.tsx b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex.tsx index 3a5cbf0..2b251a2 100644 --- a/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex.tsx +++ b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndex.tsx @@ -1,24 +1,23 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; -import { useResponse } from '@/shared/components/response/ResponseContext'; - -import Header from '@/shared/components/structure/Header'; -import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; -import Loading from '@/shared/components/loading/loading'; - -import TCensecNaturezaLitigioTable from './TCensecNaturezaLitigioTable'; -import TCensecNaturezaLitigioForm from './TCensecNaturezaLitigioForm'; - import { useTCensecNaturezaLitigioReadHook } from '@/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook'; -import { useTCensecNaturezaLitigioSaveHook } from '@/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook'; import { useTCensecNaturezaLitigioRemoveHook } from '@/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook'; - -import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; +import { useTCensecNaturezaLitigioSaveHook } from '@/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; +import { useResponse } from '@/shared/components/response/ResponseContext'; +import Header from '@/shared/components/structure/Header'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import TCensecNaturezaLitigioForm from './TCensecNaturezaLitigioForm'; +import TCensecNaturezaLitigioTable from './TCensecNaturezaLitigioTable'; +import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; + + const initialCensecNaturezaLitigio: TCensecNaturezaLitigioInterface = { censec_naturezalitigio_id: 0, descricao: '', diff --git a/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioTable.tsx b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioTable.tsx index 768d618..86d36e6 100644 --- a/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioTable.tsx +++ b/src/packages/administrativo/components/TCensecNaturezaLitigio/TCensecNaturezaLitigioTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -17,7 +19,6 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeColumns.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeColumns.tsx index 43c4cc2..a9f44fd 100644 --- a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeColumns.tsx +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeColumns.tsx @@ -1,7 +1,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; -import { Button } from '@/components/ui/button'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -10,8 +10,10 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; + +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; export default function TCensecQualidadeColumns( onEdit: (item: TCensecQualidadeInterface, isEditingFormStatus: boolean) => void, diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx index 60e0ca7..2c07e31 100644 --- a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeForm.tsx @@ -21,13 +21,14 @@ import { 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 ConfirmacaoSelect from '@/shared/components/confirmacao/ConfirmacaoSelect'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; + import { useTCensecQualidadeFormHook } from '../../hooks/TCensecQualidade/useTCensecQualidadeHook'; import { TCensecQualidadeFormInterface } from '../../interfaces/TCensecQualidade/TCensecQualidadeFormInterface'; -import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; -import ConfirmacaoSelect from '@/shared/components/confirmacao/ConfirmacaoSelect'; + export default function TCensecQualidadeForm({ isOpen, diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex.tsx index 2c84fc4..85f6b4d 100644 --- a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex.tsx +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeIndex.tsx @@ -2,19 +2,18 @@ import { useEffect, useState, useCallback } from 'react'; -import Loading from '@/shared/components/loading/loading'; +import { useTCensecQualidadeDeleteHook } from '@/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook'; import { useTCensecQualidadeIndexHook } from '@/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook'; import { useTCensecQualidadeSaveHook } from '@/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook'; -import { useTCensecQualidadeDeleteHook } from '@/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook'; - +import TCensecQualidadeInterface from '@/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TCensecQualidadeInterface from '@/packages/administrativo/interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; -import TCensecQualidadeTable from './TCensecQualidadeTable'; + import TCensecQualidadeForm from './TCensecQualidadeForm'; +import TCensecQualidadeTable from './TCensecQualidadeTable'; export default function TCensecQualidadeIndex() { // Controle de estado do botão diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeSelect.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeSelect.tsx index 70aa982..c23b274 100644 --- a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeSelect.tsx +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeSelect.tsx @@ -1,6 +1,8 @@ 'use client'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; import React from 'react'; + import { Button } from '@/components/ui/button'; import { Command, @@ -13,8 +15,8 @@ import { import { FormControl } from '@/components/ui/form'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; -import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; + import { useTCensecQualidadeIndexHook } from '../../hooks/TCensecQualidade/useTCensecQualidadeIndexHook'; export default function TCensecQualidadeSelect({ field }: any) { diff --git a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx index 21b6475..4b3ff5a 100644 --- a/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx +++ b/src/packages/administrativo/components/TCensecQualidade/TCensecQualidadeTable.tsx @@ -1,6 +1,7 @@ 'use client'; import { DataTable } from '@/shared/components/dataTable/DataTable'; + import TCensecQualidadeColumns from './TCensecQualidadeColumns'; import TCensecQualidadeTableInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeTableInterface'; diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx index fa27fad..046e3a8 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoColumns.tsx @@ -1,6 +1,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import { Button } from '@/components/ui/button'; import { ArrowUpDownIcon, EllipsisIcon, Trash2Icon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -10,6 +11,7 @@ import { } from '@/components/ui/dropdown-menu'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; + import TCensecQualidadeAtoJoinedInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface'; export default function TCensecQualidadeAtoColumns( diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx index 93d89aa..ecec1cf 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoForm.tsx @@ -13,15 +13,15 @@ import { DialogTitle, } from '@/components/ui/dialog'; import { Form } from '@/components/ui/form'; - -import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; -import { DataTable } from '@/shared/components/dataTable/DataTable'; import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; -import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import { DataTable } from '@/shared/components/dataTable/DataTable'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; + +import TCensecQualidadeAtoFormColumns from './TCensecQualidadeAtoFormColumns'; +import { useTCensecQualidadeIndexHook } from '../../hooks/TCensecQualidade/useTCensecQualidadeIndexHook'; import { useTCensecQualidadeAtoFormHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook'; import TCensecQualidadeAtoFormInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoFormInterface'; -import { useTCensecQualidadeIndexHook } from '../../hooks/TCensecQualidade/useTCensecQualidadeIndexHook'; -import TCensecQualidadeAtoFormColumns from './TCensecQualidadeAtoFormColumns'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; export default function TCensecQualidadeAtoForm({ isOpen, diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx index 9aa373e..24574bf 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoFormColumns.tsx @@ -1,11 +1,13 @@ import { ColumnDef } from '@tanstack/react-table'; -import { Checkbox } from '@/components/ui/checkbox'; -import { Button } from '@/components/ui/button'; import { ArrowUpDownIcon } from 'lucide-react'; -import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; -import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; + +import { Button } from '@/components/ui/button'; +import { Checkbox } from '@/components/ui/checkbox'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; + export default function TCensecQualidadeAtoFormColumns( setSelectedTCensecQualidadeAto: React.Dispatch< React.SetStateAction diff --git a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx index 0eb65a5..0ffafbd 100644 --- a/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx +++ b/src/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex.tsx @@ -2,18 +2,18 @@ import React, { useEffect, useState, useCallback } from 'react'; -import { useTCensecQualidadeAtoIndexHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook'; -import { useTCensecQualidadeAtoSaveHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook'; -import { useTCensecQualidadeAtoDeleteHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TCensecQualidadeAtoTable from './TCensecQualidadeAtoTable'; import Header from '@/shared/components/structure/Header'; + import TCensecQualidadeAtoForm from './TCensecQualidadeAtoForm'; -import TCensecQualidadeAtoPageInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface'; +import TCensecQualidadeAtoTable from './TCensecQualidadeAtoTable'; +import { useTCensecQualidadeAtoDeleteHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook'; +import { useTCensecQualidadeAtoIndexHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook'; +import { useTCensecQualidadeAtoSaveHook } from '../../hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook'; import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; +import TCensecQualidadeAtoPageInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoPageInterface'; export default function TCensecQualidadeAtoIndex({ censec_tipoato_id, diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx index 2eb3c94..1e6761f 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoForm.tsx @@ -1,10 +1,11 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { IdCardIcon, UserIcon } from 'lucide-react'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; -import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import z from 'zod'; + import { Button } from '@/components/ui/button'; import { Dialog, @@ -31,13 +32,15 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select'; -import { TCensecTipoAtoSchema } from '../../schemas/TCensecTipoAto/TCensecTipoAtoSchema'; -import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; -import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; -import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; -import { IdCardIcon, UserIcon } from 'lucide-react'; import TCensecQualidadeAtoIndex from '@/packages/administrativo/components/TCensecQualidadeAto/TCensecQualidadeAtoIndex'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import SituacoesSelect from '@/shared/components/situacoes/SituacoesSelect'; +import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; + +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; +import { TCensecTipoAtoSchema } from '../../schemas/TCensecTipoAto/TCensecTipoAtoSchema'; + type FormValues = z.infer; diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx index abc98f5..70a3f57 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoIndex.tsx @@ -1,24 +1,23 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; -import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import Header from '@/shared/components/structure/Header'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; import Loading from '@/shared/components/loading/loading'; - -import TCensecTipoAtoTable from './TCensecTipoAtoTable'; -import TCensecTipoAtoForm from './TCensecTipoAtoForm'; - -import { useTCensecTipoAtoReadHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoReadHook'; -import { useTCensecTipoAtoSaveHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook'; -import { useTCensecTipoAtoRemoveHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook'; -import { useTCensecReadHook } from '../../hooks/TCensec/useTCensecReadHook'; - -import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; +import Header from '@/shared/components/structure/Header'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import TCensecTipoAtoForm from './TCensecTipoAtoForm'; +import TCensecTipoAtoTable from './TCensecTipoAtoTable'; +import { useTCensecReadHook } from '../../hooks/TCensec/useTCensecReadHook'; +import { useTCensecTipoAtoReadHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoReadHook'; +import { useTCensecTipoAtoRemoveHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook'; +import { useTCensecTipoAtoSaveHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; + + // Estado inicial para criação const initialTCensecTipoAto: TCensecTipoAtoInterface = { censec_tipoato_id: 0, diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx index 18fdbc3..334a9b4 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoSelect.tsx @@ -1,6 +1,8 @@ 'use client'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; import React from 'react'; + import { Button } from '@/components/ui/button'; import { Command, @@ -13,9 +15,8 @@ import { import { FormControl } from '@/components/ui/form'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; -import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; -import GetCapitalize from '@/shared/actions/text/GetCapitalize'; import { useTCensecTipoAtoReadHook } from '@/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; export default function TCensecTipoAtoSelect({ field }: any) { const [open, setOpen] = React.useState(false); diff --git a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx index ff37b64..c866eb8 100644 --- a/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx +++ b/src/packages/administrativo/components/TCensecTipoAto/TCensecTipoAtoTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -17,9 +19,9 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; -import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; + import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; interface TCensecTipoAtoTableProps { data: TCensecTipoAtoInterface[]; diff --git a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx index 9cd652c..f78939a 100644 --- a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaColumns.tsx @@ -1,7 +1,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; -import { Button } from '@/components/ui/button'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -10,11 +10,13 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; import { TipoAtoAnteriorEnum } from '@/shared/enums/TipoAtoAnteriorEnum'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; + export default function TCensecTipoNaturezaColumns( onEdit: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void, onDelete: (item: TCensecTipoNaturezaInterface, isEditingFormStatus: boolean) => void, diff --git a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx index 649b3b3..f3950fe 100644 --- a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaForm.tsx @@ -21,17 +21,18 @@ import { 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 { useTCensecTipoNaturezaFormHook } from '../../hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook'; -import { TCensecTipoNaturezaFormInterface } from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface'; import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; -import TCensecTipoAtoSelect from '../TCensecTipoAto/TCensecTipoAtoSelect'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; import ConfirmacaoSelect from '@/shared/components/confirmacao/ConfirmacaoSelect'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import TipoAtoAnteriorSelect from '@/shared/components/tipoAtoAnterior/TipoAtoAnteriorSelect'; import TipoNaturezaSelect from '@/shared/components/tipoNatureza/TipoNaturezaSelect'; +import { useTCensecTipoNaturezaFormHook } from '../../hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook'; +import { TCensecTipoNaturezaFormInterface } from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaFormInterface'; +import TCensecTipoAtoSelect from '../TCensecTipoAto/TCensecTipoAtoSelect'; + + export default function TCensecTipoNaturezaForm({ isOpen, data, diff --git a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex.tsx index 2bf54be..53ff874 100644 --- a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex.tsx +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaIndex.tsx @@ -2,19 +2,18 @@ import { useEffect, useState, useCallback } from 'react'; -import Loading from '@/shared/components/loading/loading'; +import { useTCensecTipoNaturezaDeleteHook } from '@/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook'; import { useTCensecTipoNaturezaIndexHook } from '@/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook'; import { useTCensecTipoNaturezaSaveHook } from '@/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook'; -import { useTCensecTipoNaturezaDeleteHook } from '@/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook'; - +import TCensecTipoNaturezaInterface from '@/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TCensecTipoNaturezaInterface from '@/packages/administrativo/interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; -import TCensecTipoNaturezaTable from './TCensecTipoNaturezaTable'; + import TCensecTipoNaturezaForm from './TCensecTipoNaturezaForm'; +import TCensecTipoNaturezaTable from './TCensecTipoNaturezaTable'; export default function TCensecTipoNaturezaIndex() { // Controle de estado do botão diff --git a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaTable.tsx b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaTable.tsx index 0b19cc6..3dc5b5c 100644 --- a/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaTable.tsx +++ b/src/packages/administrativo/components/TCensecTipoNatureza/TCensecTipoNaturezaTable.tsx @@ -1,6 +1,7 @@ 'use client'; import { DataTable } from '@/shared/components/dataTable/DataTable'; + import TCensecTipoNaturezaColumns from './TCensecTipoNaturezaColumns'; import TCensecTipoNaturezaTableInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaTableInterface'; diff --git a/src/packages/administrativo/components/TImovel/TImovelColumns.tsx b/src/packages/administrativo/components/TImovel/TImovelColumns.tsx index b199571..2a39cba 100644 --- a/src/packages/administrativo/components/TImovel/TImovelColumns.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelColumns.tsx @@ -1,9 +1,7 @@ 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 { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -12,9 +10,13 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { ImovelTipoRegistro } from '@/shared/enums/ImovelTipoRegistro'; -import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; +import { FormatCEP } from '@/shared/actions/CEP/FormatCEP'; +import { FormatDateTime } from '@/shared/actions/dateTime/FormatDateTime'; import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; +import { ImovelTipoRegistro } from '@/shared/enums/ImovelTipoRegistro'; + +import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; 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 7564d71..4e45508 100644 --- a/src/packages/administrativo/components/TImovel/TImovelForm.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelForm.tsx @@ -1,5 +1,6 @@ 'use client'; +import { HouseIcon, IdCardIcon } from 'lucide-react'; import React, { useEffect } from 'react'; import { Button } from '@/components/ui/button'; @@ -21,18 +22,19 @@ import { 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 } from 'lucide-react'; -import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; -import { TImovelFormInterface } from '../../interfaces/TImovel/TImovelFormInterface'; -import { useTImovelFormHook } from '../../hooks/TImovel/useTImovelFormHook'; -import TImovelUnidadeUrbanoPage from '../TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndex'; -import TImovelUnidadeRuralIndex from '../TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndex'; import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; + import TImovelTipoRegistroSelect from './TImovelTipoRegistroSelect'; +import { useTImovelFormHook } from '../../hooks/TImovel/useTImovelFormHook'; +import { TImovelFormInterface } from '../../interfaces/TImovel/TImovelFormInterface'; import GTBBairroSelect from '../GTBBairro/GTBBairroSelect'; +import TImovelUnidadeRuralIndex from '../TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndex'; +import TImovelUnidadeUrbanoPage from '../TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndex'; + + export default function TImovelForm({ isOpen, diff --git a/src/packages/administrativo/components/TImovel/TImovelIndex.tsx b/src/packages/administrativo/components/TImovel/TImovelIndex.tsx index d65aa21..bf6b260 100644 --- a/src/packages/administrativo/components/TImovel/TImovelIndex.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelIndex.tsx @@ -2,21 +2,20 @@ import { useEffect, useState, useCallback } from 'react'; -import Loading from '@/shared/components/loading/loading'; +import { useTImovelDeleteHook } from '@/packages/administrativo/hooks/TImovel/useTImovelDeleteHook'; 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 TImovelInterface from '@/packages/administrativo/interfaces/TImovel/TImovelInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TImovelInterface from '@/packages/administrativo/interfaces/TImovel/TImovelInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; -import { TImovelIndexInterface } from '../../interfaces/TImovel/TImovelIndexInterface'; -import TImovelTable from './TImovelTable'; + import TImovelForm from './TImovelForm'; +import TImovelTable from './TImovelTable'; import { TImovelIndexDataInterface } from '../../interfaces/TImovel/TImovelIndexDataInterface'; +import { TImovelIndexInterface } from '../../interfaces/TImovel/TImovelIndexInterface'; export default function TImovelIndex({ pageTitle, diff --git a/src/packages/administrativo/components/TImovel/TImovelTable.tsx b/src/packages/administrativo/components/TImovel/TImovelTable.tsx index 809655c..491ec54 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTable.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTable.tsx @@ -1,6 +1,7 @@ 'use client'; import { DataTable } from '@/shared/components/dataTable/DataTable'; + import TImovelColumns from './TImovelColumns'; import TImovelTableInterface from '../../interfaces/TImovel/TImovelTabelInterface'; diff --git a/src/packages/administrativo/components/TImovel/TImovelTipoConstrucaoSelect.tsx b/src/packages/administrativo/components/TImovel/TImovelTipoConstrucaoSelect.tsx index 8be72a0..3ff9b63 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTipoConstrucaoSelect.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTipoConstrucaoSelect.tsx @@ -1,3 +1,7 @@ +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; + import { Button } from '@/components/ui/button'; import { CommandEmpty, @@ -10,9 +14,6 @@ import { FormControl } from '@/components/ui/form'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; import { ImovelConstrucaoEnum } from '@/shared/enums/ImovelConstrucaoEnum'; -import { Command } from 'cmdk'; -import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; -import React from 'react'; export default function TImovelTipoConstrucaoSelect({ field }: any) { const [open, setOpen] = React.useState(false); diff --git a/src/packages/administrativo/components/TImovel/TImovelTipoImovelSelect.tsx b/src/packages/administrativo/components/TImovel/TImovelTipoImovelSelect.tsx index ed5a113..af6ace4 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTipoImovelSelect.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTipoImovelSelect.tsx @@ -1,3 +1,7 @@ +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; + import { Button } from '@/components/ui/button'; import { CommandEmpty, @@ -10,9 +14,6 @@ import { FormControl } from '@/components/ui/form'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; import { ImovelTipoEnum } from '@/shared/enums/ImovelTipoEnum'; -import { Command } from 'cmdk'; -import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; -import React from 'react'; export default function TImovelTipoImovelSelect({ field }: any) { const [open, setOpen] = React.useState(false); diff --git a/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx b/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx index 8243c50..d982481 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTipoLogradouroSelect.tsx @@ -1,6 +1,8 @@ 'use client'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; import React from 'react'; + import { Button } from '@/components/ui/button'; import { Command, @@ -13,9 +15,8 @@ import { import { FormControl } from '@/components/ui/form'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; -import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; -import GetCapitalize from '@/shared/actions/text/GetCapitalize'; import { useGTBTipoLogradouroReadHook } from '@/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; export default function TImovelTipoLogradouroSelect({ field }: any) { const [open, setOpen] = React.useState(false); diff --git a/src/packages/administrativo/components/TImovel/TImovelTipoRegistroSelect.tsx b/src/packages/administrativo/components/TImovel/TImovelTipoRegistroSelect.tsx index b432316..ecdddea 100644 --- a/src/packages/administrativo/components/TImovel/TImovelTipoRegistroSelect.tsx +++ b/src/packages/administrativo/components/TImovel/TImovelTipoRegistroSelect.tsx @@ -1,3 +1,7 @@ +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; + import { Button } from '@/components/ui/button'; import { CommandEmpty, @@ -10,9 +14,6 @@ import { FormControl } from '@/components/ui/form'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; import { ImovelTipoRegistro } from '@/shared/enums/ImovelTipoRegistro'; -import { Command } from 'cmdk'; -import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; -import React from 'react'; export default function TImovelTipoRegistroSelect({ field }: any) { const [open, setOpen] = React.useState(false); diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx index fc63d06..48c3264 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralColumns.tsx @@ -1,6 +1,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import { Button } from '@/components/ui/button'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -9,8 +10,8 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; export default function TImovelUnidadeColumns( onEdit: (item: TImovelUnidadeRuralInterface, isEditingFormStatus: boolean) => void, diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx index 126ed79..23957e3 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralForm.tsx @@ -21,11 +21,6 @@ import { 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 { TImovelUnidadeRuralFormInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface'; -import { useTImovelUnidadeRuralFormHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook'; import { Select, SelectContent, @@ -33,9 +28,14 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select'; +import { useTImovelUnidadeRuralFormHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook'; +import { TImovelUnidadeRuralFormInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralFormInterface'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; -import TImovelTipoImovelSelect from '../../TImovel/TImovelTipoImovelSelect'; + import TImovelTipoConstrucaoSelect from '../../TImovel/TImovelTipoConstrucaoSelect'; +import TImovelTipoImovelSelect from '../../TImovel/TImovelTipoImovelSelect'; export default function TImovelUnidadeRuralForm({ isOpen, diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndex.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndex.tsx index 395d00d..386ede0 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndex.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndex.tsx @@ -2,18 +2,18 @@ import { useEffect, useState, useCallback } from 'react'; -import TImovelUnidadeRuralTable 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 { useTImovelUnidadeRuralDeleteHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralDeleteHook'; 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'; import TImovelUnidadePageInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface'; +import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; +import Header from '@/shared/components/structure/Header'; + +import TImovelUnidadeRuralForm from './TImovelUnidadeRuralForm'; +import TImovelUnidadeRuralTable from './TImovelUnidadeRuralTable'; export default function TImovelUnidadeRuralIndex({ imovel_id }: TImovelUnidadePageInterface) { const TImovelUnidadePage: TImovelUnidadePageInterface = { diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTable.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTable.tsx index 0fd17c1..30933f7 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTable.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTable.tsx @@ -1,8 +1,9 @@ 'use client'; -import { DataTable } from '@/shared/components/dataTable/DataTable'; -import TImovelUnidadeColumns from './TImovelUnidadeRuralColumns'; import TImovelUnidadeRuralTableInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralTableInterface'; +import { DataTable } from '@/shared/components/dataTable/DataTable'; + +import TImovelUnidadeColumns from './TImovelUnidadeRuralColumns'; /** * Componente principal da tabela diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx index c62e290..725954d 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoColumns.tsx @@ -1,6 +1,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import { Button } from '@/components/ui/button'; import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -9,8 +10,8 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import { SortableHeader } from '@/shared/components/dataTable/SortableHeader'; export default function TImovelUnidadeUrbanoColumns( onEdit: (item: TImovelUnidadeUrbanoInterface, isEditingFormStatus: boolean) => void, diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx index a8573cd..608f42c 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoForm.tsx @@ -21,14 +21,14 @@ import { 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 { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; import { useTImovelUnidadeUrbanoFormHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook'; import { TImovelUnidadeUrbanoFormInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoFormInterface'; -import TImovelTipoImovelSelect from '../../TImovel/TImovelTipoImovelSelect'; +import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; + import TImovelTipoConstrucaoSelect from '../../TImovel/TImovelTipoConstrucaoSelect'; +import TImovelTipoImovelSelect from '../../TImovel/TImovelTipoImovelSelect'; import TImovelTipoLogradouroSelect from '../../TImovel/TImovelTipoLogradouroSelect'; export default function TImovelUnidadeUrbanoForm({ diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndex.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndex.tsx index 37f3558..3513ba1 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndex.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndex.tsx @@ -2,17 +2,18 @@ import { useEffect, useState, useCallback, Suspense } from 'react'; -import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; -import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import Header from '@/shared/components/structure/Header'; +import { useTImovelUnidadeUrbanoDeleteHook } from '@/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoDeleteHook'; 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'; import TImovelUnidadePageInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface'; +import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; +import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; +import Header from '@/shared/components/structure/Header'; + +import TImovelUnidadeUrbanoForm from './TImovelUnidadeUrbanoForm'; +import TImovelUnidadeUrbanoTable from './TImovelUnidadeUrbanoTable'; + export default function TImovelUnidadeUrbanoPage({ imovel_id }: TImovelUnidadePageInterface) { const TImovelUnidadePage: TImovelUnidadePageInterface = { diff --git a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTable.tsx b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTable.tsx index 3085c73..be3633d 100644 --- a/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTable.tsx +++ b/src/packages/administrativo/components/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTable.tsx @@ -1,8 +1,9 @@ 'use client'; -import { DataTable } from '@/shared/components/dataTable/DataTable'; -import TImovelUnidadeColumns from './TImovelUnidadeUrbanoColumns'; import TImovelUnidadeUrbanoTableInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoTableInterface'; +import { DataTable } from '@/shared/components/dataTable/DataTable'; + +import TImovelUnidadeColumns from './TImovelUnidadeUrbanoColumns'; /** * Componente principal da tabela */ diff --git a/src/packages/administrativo/components/TMinuta/TMinutaForm.tsx b/src/packages/administrativo/components/TMinuta/TMinutaForm.tsx index 021d921..c5823fc 100644 --- a/src/packages/administrativo/components/TMinuta/TMinutaForm.tsx +++ b/src/packages/administrativo/components/TMinuta/TMinutaForm.tsx @@ -1,10 +1,11 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; +import MainEditor from '@/components/MainEditor'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; import { @@ -27,7 +28,6 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import MainEditor from '@/components/MainEditor'; import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; import { TMinutaSchema } from '../../schemas/TMinuta/TMinutaSchema'; diff --git a/src/packages/administrativo/components/TMinuta/TMinutaTable.tsx b/src/packages/administrativo/components/TMinuta/TMinutaTable.tsx index 77a3926..8562fc6 100644 --- a/src/packages/administrativo/components/TMinuta/TMinutaTable.tsx +++ b/src/packages/administrativo/components/TMinuta/TMinutaTable.tsx @@ -1,6 +1,8 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import Link from 'next/link'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -18,7 +20,7 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; interface TMinutaTableProps { diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx index a65abb0..c67bee5 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaColumns.tsx @@ -1,8 +1,6 @@ -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 { ColumnDef } from '@tanstack/react-table'; +import { ArrowUpDownIcon, EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -13,8 +11,12 @@ import { 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'; +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'; + /** * Função para criar a definição das colunas da tabela diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx index 6c59e0e..10bfff3 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaForm.tsx @@ -1,8 +1,17 @@ 'use client'; +import { CheckIcon, ChevronsUpDownIcon, HouseIcon, IdCardIcon, UserIcon } from 'lucide-react'; import React, { useEffect } from 'react'; import { Button } from '@/components/ui/button'; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command'; import { Dialog, DialogClose, @@ -21,27 +30,21 @@ import { 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 '../../../hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook'; -import GetCapitalize from '@/shared/actions/text/GetCapitalize'; -import { useGTBRegimeComunhaoReadHook } from '../../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook'; -import { useGTBProfissaoReadHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; -import { - Command, - CommandEmpty, - CommandGroup, - CommandInput, - CommandItem, - CommandList, -} from '@/components/ui/command'; +import { Select, SelectContent, SelectItem, SelectTrigger } from '@/components/ui/select'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { cn } from '@/lib/utils'; +import { useGTBProfissaoReadHook } from '@/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook'; import TPessoaFisicaFormInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaFormInterface'; +import GetCapitalize from '@/shared/actions/text/GetCapitalize'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { Sexo } from '@/shared/enums/SexoEnum'; + +import { useGTBEstadoCivilReadHook } from '../../../hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook'; + + +import { useGTBRegimeComunhaoReadHook } from '../../../hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook'; + import { useTPessoaFisicaFormHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook'; import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx index 95c4871..b840e48 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaIndex.tsx @@ -2,18 +2,15 @@ import React, { useEffect, useState, useCallback } from 'react'; -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'; - +import TPessoaTable from '@/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaTable'; +import { useTPessoaFisicaDeleteHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook'; 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 TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; export default function TPessoaFisicaIndex() { diff --git a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaTable.tsx b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaTable.tsx index 9a4907b..59f1265 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaTable.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaFisica/TPessoaFisicaTable.tsx @@ -1,7 +1,8 @@ 'use client'; -import { DataTable } from '@/shared/components/dataTable/DataTable'; import TPessoaFisicaTableInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaTableInterface'; +import { DataTable } from '@/shared/components/dataTable/DataTable'; + import { TPessoaFisicaColumns } from './TPessoaFisicaColumns'; /** diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx index e6dca9a..fe9e0a8 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaColumns.tsx @@ -1,7 +1,6 @@ -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 { ColumnDef } from '@tanstack/react-table'; +import { ArrowUpDownIcon, EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -12,8 +11,11 @@ import { 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'; +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'; + export default function TPessoaJuridicaColumns( onEdit: (item: TPessoaJuridicaInterface, isEditingFormStatus: boolean) => void, diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx index 5d9e1dc..93d9eb8 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm.tsx @@ -1,5 +1,6 @@ 'use client'; +import { HouseIcon, IdCardIcon, UserIcon } from 'lucide-react'; import React, { useEffect } from 'react'; import { Button } from '@/components/ui/button'; @@ -21,15 +22,14 @@ import { 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 TPessoaRepresentantePage from '../../TPessoaRepresentante/TPessoaRepresentanteIndex'; import { useTPessoaJuridicaFormHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook'; import TPessoaJuridicaFormInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaFormInterface'; -import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; import { parseNumberInput } from '@/shared/actions/form/parseNumberInput'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; + +import TPessoaRepresentantePage from '../../TPessoaRepresentante/TPessoaRepresentanteIndex'; export default function TPessoaJuridicaForm({ isOpen, diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx index a8e860e..73e4788 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaIndex.tsx @@ -2,20 +2,17 @@ import React, { useEffect, useState, useCallback } from 'react'; -import Loading from '@/shared/components/loading/loading'; - -import { useTPessoaJuridicaSaveHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook'; +import TPessoaJuridicaForm from '@/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaForm'; +import TPessoaJuridicaTable from '@/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaTable'; import { useTPessoaJuridicaDeleteHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaDeleteHook'; - +import { useTPessoaJuridicaIndexHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaIndexHook'; +import { useTPessoaJuridicaSaveHook } from '@/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook'; +import TPessoaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaInterface'; +import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TPessoaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaInterface'; +import Loading from '@/shared/components/loading/loading'; 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'; -import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; export default function TPessoaJuridicaIndex() { // Controle de estado do botão diff --git a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaTable.tsx b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaTable.tsx index da1b2ee..65f83cf 100644 --- a/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaTable.tsx +++ b/src/packages/administrativo/components/TPessoa/TPessoaJuridica/TPessoaJuridicaTable.tsx @@ -1,9 +1,9 @@ 'use client'; +import TPessoaJuridicaTableInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaTableInterface'; import { DataTable } from '@/shared/components/dataTable/DataTable'; import TPessoaJuridicaColumns from './TPessoaJuridicaColumns'; -import TPessoaJuridicaTableInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaTableInterface'; /** * Componente principal da tabela diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx index 1e92d6d..2ed38f0 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteColumns.tsx @@ -1,7 +1,7 @@ import { ColumnDef } from '@tanstack/react-table'; -import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; -import { Button } from '@/components/ui/button'; import { ArrowUpDownIcon, EllipsisIcon, Trash2Icon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -9,10 +9,12 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import TPessoaRepresentanteJoinedInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteJoinedInterface'; import GetNameInitials from '@/shared/actions/text/GetNameInitials'; import empty from '@/shared/actions/validations/empty'; +import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; +import TPessoaRepresentanteJoinedInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteJoinedInterface'; + export default function TPessoaRepresentanteColumns( onDelete: (item: TPessoaRepresentanteInterface, isEditingFormStatus: boolean) => void, ): ColumnDef[] { diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx index dce1501..a8ddf69 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteForm.tsx @@ -13,15 +13,15 @@ import { DialogTitle, } from '@/components/ui/dialog'; import { Form } from '@/components/ui/form'; - -import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; +import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; import { DataTable } from '@/shared/components/dataTable/DataTable'; +import LoadingButton from '@/shared/components/loadingButton/LoadingButton'; + +import TPessoasRepresentanteFormColumns from './TPessoasRepresentanteFormColumns'; import { useTPessoaFisicaIndexHook } from '../../hooks/TPessoa/TPessoaFisica/useTPessoaFisicaIndexHook'; import { useTPessoaRepresentanteFormHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook'; -import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData'; -import TPessoaRepresentanteFormInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentnateFormInterface'; import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; -import TPessoasRepresentanteFormColumns from './TPessoasRepresentanteFormColumns'; +import TPessoaRepresentanteFormInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentnateFormInterface'; export default function TPessoaRepresentanteForm({ isOpen, diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx index 7488015..5669279 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoaRepresentanteIndex.tsx @@ -2,20 +2,20 @@ import React, { useEffect, useState, useCallback } from 'react'; -import Loading from '@/shared/components/loading/loading'; -import { useTPessoaRepresentanteIndexHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook'; -import { useTPessoaRepresentanteSaveHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteSaveHook'; -import { useTPessoaRepresentanteDeleteHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteDeleteHook'; import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TPessoaRepresentanteTable from './TPessoaRepresentanteTable'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; + import TPessoaRepresentanteForm from './TPessoaRepresentanteForm'; -import TPessoaRepresentantePageInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentantePageInterface'; +import TPessoaRepresentanteTable from './TPessoaRepresentanteTable'; +import { useTPessoaRepresentanteDeleteHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteDeleteHook'; +import { useTPessoaRepresentanteIndexHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook'; +import { useTPessoaRepresentanteSaveHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteSaveHook'; import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; +import TPessoaRepresentantePageInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentantePageInterface'; export default function TPessoaRepresentantePage({ pessoa_id }: TPessoaRepresentantePageInterface) { const TPessoaRepresentantePage: TPessoaRepresentantePageInterface = { diff --git a/src/packages/administrativo/components/TPessoaRepresentante/TPessoasRepresentanteFormColumns.tsx b/src/packages/administrativo/components/TPessoaRepresentante/TPessoasRepresentanteFormColumns.tsx index 9eae79f..fbb8833 100644 --- a/src/packages/administrativo/components/TPessoaRepresentante/TPessoasRepresentanteFormColumns.tsx +++ b/src/packages/administrativo/components/TPessoaRepresentante/TPessoasRepresentanteFormColumns.tsx @@ -1,12 +1,14 @@ import { ColumnDef } from '@tanstack/react-table'; -import { Checkbox } from '@/components/ui/checkbox'; -import { Button } from '@/components/ui/button'; import { ArrowUpDownIcon } from 'lucide-react'; -import empty from '@/shared/actions/validations/empty'; + +import { Button } from '@/components/ui/button'; +import { Checkbox } from '@/components/ui/checkbox'; import { FormatCPF } from '@/shared/actions/CPF/FormatCPF'; import { FormatPhone } from '@/shared/actions/phone/FormatPhone'; -import TPessoaFisicaInterface from '../../interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; import GetNameInitials from '@/shared/actions/text/GetNameInitials'; +import empty from '@/shared/actions/validations/empty'; + +import TPessoaFisicaInterface from '../../interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; /** diff --git a/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoForm.tsx b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoForm.tsx index fc97b91..7612c26 100644 --- a/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoForm.tsx +++ b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoForm.tsx @@ -1,9 +1,9 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; @@ -34,8 +34,8 @@ import { SelectValue, } from '@/components/ui/select'; -import { TTBAndamentoServicoSchema } from '../../schemas/TTBAndamentoServico/TTBAndamentoServicoSchema'; import { tipoEnum } from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; +import { TTBAndamentoServicoSchema } from '../../schemas/TTBAndamentoServico/TTBAndamentoServicoSchema'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex.tsx b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex.tsx index bb23196..098b71d 100644 --- a/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex.tsx +++ b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoIndex.tsx @@ -1,22 +1,21 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; - -import Loading from '@/shared/components/loading/loading'; -import TTBAndamentoServicoTable from './TTBAndamentoServicoTable'; -import TTBAndamentoServicoForm from './TTBAndamentoServicoForm'; - +import { useTTBAndamentoServicoDeleteHook } from '@/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook'; import { useTTBAndamentoServicoReadHook } from '@/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook'; import { useTTBAndamentoServicoSaveHook } from '@/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook'; - import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; - -import TTBAndamentoServicoInterface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; -import { useTTBAndamentoServicoDeleteHook } from '@/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook'; +import Loading from '@/shared/components/loading/loading'; import Header from '@/shared/components/structure/Header'; +import TTBAndamentoServicoForm from './TTBAndamentoServicoForm'; +import TTBAndamentoServicoTable from './TTBAndamentoServicoTable'; +import TTBAndamentoServicoInterface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; + + export default function TTBAndamentoServicoIndex() { // Hooks para leitura e salvamento const { tTBAndamentosServicos, fetchTTBAndamentoServico } = useTTBAndamentoServicoReadHook(); diff --git a/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoTable.tsx b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoTable.tsx index e346ed4..511ecd6 100644 --- a/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoTable.tsx +++ b/src/packages/administrativo/components/TTBAndamentoServico/TTBAndamentoServicoTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -18,7 +20,6 @@ import { TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import TTBAndamentoServicoInteface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; interface TTBAndamentoServicoTableProps { diff --git a/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoForm.tsx b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoForm.tsx index 0042b1a..cd047c1 100644 --- a/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoForm.tsx +++ b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoForm.tsx @@ -1,9 +1,9 @@ 'use client'; -import z from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; +import z from 'zod'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; @@ -27,8 +27,8 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import { TTBReconhecimentoTipoSchema } from '../../schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema'; import { situacaoEnum } from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; +import { TTBReconhecimentoTipoSchema } from '../../schemas/TTBReconhecimentoTipo/TTBReconhecimentoTipoSchema'; type FormValues = z.infer; diff --git a/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex.tsx b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex.tsx index 114cece..d7afbed 100644 --- a/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex.tsx +++ b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndex.tsx @@ -1,20 +1,18 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; + import { Card, CardContent } from '@/components/ui/card'; - -import Loading from '@/shared/components/loading/loading'; -import Header from '@/shared/components/structure/Header'; -import TTBReconhecimentoTipoTable from './TTBReconhecimentoTipoTable'; -import TTBReconhecimentoTipoForm from './TTBReconhecimentoTipoForm'; - +import { useTTBReconhecimentoTipoDeleteHook } from '@/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook'; import { useTTBReconhecimentoTipoReadHook } from '@/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook'; import { useTTBReconhecimentoTipoSaveHook } from '@/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook'; -import { useTTBReconhecimentoTipoDeleteHook } from '@/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook'; - import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog'; import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog'; +import Loading from '@/shared/components/loading/loading'; +import Header from '@/shared/components/structure/Header'; +import TTBReconhecimentoTipoForm from './TTBReconhecimentoTipoForm'; +import TTBReconhecimentoTipoTable from './TTBReconhecimentoTipoTable'; import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; export default function TTBReconhecimentoTipoIndex() { diff --git a/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoTable.tsx b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoTable.tsx index 1724e30..6632b9b 100644 --- a/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoTable.tsx +++ b/src/packages/administrativo/components/TTBReconhecimentoTipo/TTBReconhecimentoTipoTable.tsx @@ -1,5 +1,7 @@ 'use client'; +import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; + import { Button } from '@/components/ui/button'; import { DropdownMenu, @@ -18,7 +20,6 @@ import { TableRow, } from '@/components/ui/table'; -import { EllipsisIcon, PencilIcon, Trash2Icon } from 'lucide-react'; import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; interface TTBReconhecimentoTipoTableProps { diff --git a/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts b/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts index 513c160..1632f42 100644 --- a/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts +++ b/src/packages/administrativo/data/GCidade/GCidadeRemoveData.ts @@ -1,14 +1,14 @@ // Importa o serviço de API que será utilizado para realizar requisições HTTP +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; 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 '@/shared/services/api/enums/ApiMethodEnum'; // Importa a interface tipada que define a estrutura dos dados de uma cidade -import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Importa função que encapsula chamadas assíncronas e trata erros automaticamente -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/packages/administrativo/data/GCidade/GCidadeSaveData.ts b/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts index 8b71f79..0d87f0b 100644 --- a/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts +++ b/src/packages/administrativo/data/GCidade/GCidadeSaveData.ts @@ -1,14 +1,14 @@ // Importa o serviço de API que será utilizado para realizar requisições HTTP +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; 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 '@/shared/services/api/enums/ApiMethodEnum'; // Importa a interface tipada que define a estrutura dos dados de uma cidade -import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Importa função que encapsula chamadas assíncronas e trata erros automaticamente -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/packages/administrativo/data/GMedidoTipo/GMedidaTipoRemoveData.ts b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoRemoveData.ts index a6c03a4..40da72c 100644 --- a/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoRemoveData.ts +++ b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoRemoveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; -import { Methods } from '@/shared/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'; + +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; async function executeGMedidaTipoRemoveData(data: GMedidaTipoInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoSaveData.ts b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoSaveData.ts index 3af3ad6..7afe88e 100644 --- a/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoSaveData.ts +++ b/src/packages/administrativo/data/GMedidoTipo/GMedidaTipoSaveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; -import { Methods } from '@/shared/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'; + +import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; async function executeGMedidaTipoSaveData(data: GMedidaTipoInterface) { const isUpdate = Boolean(data.medida_tipo_id); diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts index 250f28c..6efdc44 100644 --- a/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts +++ b/src/packages/administrativo/data/GNatureza/GNaturezaDeleteData.ts @@ -1,7 +1,8 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; async function executeGNaturezaDeleteData(data: GNaturezaInterface): Promise { diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts index 5c59464..6577732 100644 --- a/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts +++ b/src/packages/administrativo/data/GNatureza/GNaturezaIndexData.ts @@ -1,7 +1,8 @@ -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; async function executeGNaturezaIndexData(data: GNaturezaInterface): Promise { diff --git a/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts b/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts index f8a95b7..62de57f 100644 --- a/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts +++ b/src/packages/administrativo/data/GNatureza/GNaturezaSaveData.ts @@ -1,7 +1,8 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; async function executeGNaturezaSaveData(data: GNaturezaInterface): Promise { diff --git a/src/packages/administrativo/data/GTBBairro/GTBBairroRemoveData.ts b/src/packages/administrativo/data/GTBBairro/GTBBairroRemoveData.ts index 643317f..ea9a76b 100644 --- a/src/packages/administrativo/data/GTBBairro/GTBBairroRemoveData.ts +++ b/src/packages/administrativo/data/GTBBairro/GTBBairroRemoveData.ts @@ -1,7 +1,7 @@ -import API from '@/shared/services/api/Api'; import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; -import { Methods } from '@/shared/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 executeGTBBairroRemoveData(data: GTBBairroInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/GTBBairro/GTBBairroSaveData.ts b/src/packages/administrativo/data/GTBBairro/GTBBairroSaveData.ts index 8e0086a..f9a4394 100644 --- a/src/packages/administrativo/data/GTBBairro/GTBBairroSaveData.ts +++ b/src/packages/administrativo/data/GTBBairro/GTBBairroSaveData.ts @@ -1,7 +1,7 @@ -import API from '@/shared/services/api/Api'; import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; -import { Methods } from '@/shared/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 executeGTBBairroSaveData(data: GTBBairroInterface) { const isUpdate = Boolean(data.tb_bairro_id); diff --git a/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts index fe0353b..1420c22 100644 --- a/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts +++ b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; -import { Methods } from '@/shared/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'; + +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; async function executeGTBEstadoCivilRemoveData(data: GTBEstadoCivilInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts index 3ee7091..891f491 100644 --- a/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts +++ b/src/packages/administrativo/data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; -import { Methods } from '@/shared/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'; + +import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; async function executeGTBEstadoCivilSaveData(data: GTBEstadoCivilInterface) { const isUpdate = Boolean(data.tb_estadocivil_id); diff --git a/src/packages/administrativo/data/GTBProfissao/GTBProfissaoRemoveData.ts b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoRemoveData.ts index a5687fd..78959fa 100644 --- a/src/packages/administrativo/data/GTBProfissao/GTBProfissaoRemoveData.ts +++ b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoRemoveData.ts @@ -1,5 +1,5 @@ -import API from '@/shared/services/api/Api'; import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; +import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBProfissaoRemoveData(data: GTBProfissaoInterface) { diff --git a/src/packages/administrativo/data/GTBProfissao/GTBProfissaoSaveData.ts b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoSaveData.ts index 8759e49..62a5970 100644 --- a/src/packages/administrativo/data/GTBProfissao/GTBProfissaoSaveData.ts +++ b/src/packages/administrativo/data/GTBProfissao/GTBProfissaoSaveData.ts @@ -1,5 +1,5 @@ -import API from '@/shared/services/api/Api'; import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; +import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GTBProfissaoSaveData(data: GTBProfissaoInterface) { diff --git a/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensRemoveData.ts b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensRemoveData.ts index 265e03f..2ec6303 100644 --- a/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensRemoveData.ts +++ b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensRemoveData.ts @@ -1,5 +1,6 @@ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; + import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; export default async function GTBRegimeBensRemoveData(data: GTBRegimeBensInterface) { diff --git a/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensSaveData.ts b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensSaveData.ts index 7a42da6..e2a4395 100644 --- a/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensSaveData.ts +++ b/src/packages/administrativo/data/GTBRegimeBens/GTBRegimeBensSaveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; -import { Methods } from '@/shared/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'; + +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; async function executeGTBRegimeBensSaveData(data: GTBRegimeBensInterface) { throw new Error('Nome e email são obrigatórios'); diff --git a/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts index b57ac35..f585d03 100644 --- a/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts +++ b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; -import { Methods } from '@/shared/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'; + +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; async function executeGTBTipoLogradouroRemoveData(data: GTBTipoLogradouroInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts index 4243ec8..6bccaaf 100644 --- a/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts +++ b/src/packages/administrativo/data/GTBTipoLogradouro/GTBTipoLogradouroSaveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; -import { Methods } from '@/shared/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'; + +import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; async function executeGTBTipoLogradouroSaveData(data: GTBTipoLogradouroInterface) { const isUpdate = Boolean(data.tb_tipologradouro_id); diff --git a/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts index 3c0148b..f1de4b3 100644 --- a/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts +++ b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData.ts @@ -1,5 +1,6 @@ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; + import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; export default async function GTBRegimeComunhaoRemoveData(data: GTBRegimeComunhaoInterface) { diff --git a/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts index 09e71cc..1720fa8 100644 --- a/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts +++ b/src/packages/administrativo/data/GTRegimeComunhao/GTBRegimeComunhaoSaveData.ts @@ -1,7 +1,8 @@ import API from '@/shared/services/api/Api'; -import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; + export default async function GTBRegimeComunhaoSaveData(data: GTBRegimeComunhaoInterface) { const isUpdate = Boolean(data.tb_regimecomunhao_id); diff --git a/src/packages/administrativo/data/GUsuario/GUsuarioLoginData.ts b/src/packages/administrativo/data/GUsuario/GUsuarioLoginData.ts index 621f05f..e545dce 100644 --- a/src/packages/administrativo/data/GUsuario/GUsuarioLoginData.ts +++ b/src/packages/administrativo/data/GUsuario/GUsuarioLoginData.ts @@ -1,7 +1,7 @@ 'use server'; -import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import API from '@/shared/services/api/Api'; +import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; export default async function GUsuarioLoginData(form: any) { const api = new API(); diff --git a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts index b87340b..e1aee14 100644 --- a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts +++ b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteDeleteData.ts @@ -1,7 +1,8 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; async function executeTAtoParteTipoDeleteData( diff --git a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts index 23be44a..1bd5563 100644 --- a/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts +++ b/src/packages/administrativo/data/TAtoTipoParte/TAtoTipoParteSaveData.ts @@ -1,8 +1,9 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; async function executeTAtoParteTipoSaveData( data: TAtoParteTipoInterface, diff --git a/src/packages/administrativo/data/TCensec/TCensecDeleteData.ts b/src/packages/administrativo/data/TCensec/TCensecDeleteData.ts index 0c1ce80..dc12a10 100644 --- a/src/packages/administrativo/data/TCensec/TCensecDeleteData.ts +++ b/src/packages/administrativo/data/TCensec/TCensecDeleteData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; -import { Methods } from '@/shared/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'; + +import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; async function executeTCensecDeleteData(data: TCensecInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/TCensec/TCensecSaveData.ts b/src/packages/administrativo/data/TCensec/TCensecSaveData.ts index fc0724e..c61a261 100644 --- a/src/packages/administrativo/data/TCensec/TCensecSaveData.ts +++ b/src/packages/administrativo/data/TCensec/TCensecSaveData.ts @@ -1,7 +1,8 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; + import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecSaveData(data: TCensecInterface) { const isUpdate = Boolean(data.censec_id); diff --git a/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts index efb5e52..d23be5a 100644 --- a/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts +++ b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; -import { Methods } from '@/shared/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'; + +import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; async function executeTCensecNaturezaLitigioRemoveData(data: TCensecNaturezaLitigioInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts index 35201df..7b867e2 100644 --- a/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts +++ b/src/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; -import { Methods } from '@/shared/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'; + +import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; async function executeTCensecNaturezaLitigioSaveData(data: TCensecNaturezaLitigioInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts index 072221e..d54b11b 100644 --- a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts +++ b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeDeleteData.ts @@ -1,7 +1,8 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; async function executeTCensecQualidadeDeleteData( diff --git a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts index fe15c4d..31587a0 100644 --- a/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts +++ b/src/packages/administrativo/data/TCensecQualidade/TCensecQualidadeSaveData.ts @@ -1,8 +1,9 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; async function executeTCensecQualidadeSaveData( data: TCensecQualidadeInterface, diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts index a329fba..f71a914 100644 --- a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; + import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; async function executeTCensecQualidadeAtoIndexData(data: TCensecQualidadeAtoInterface) { diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts index 45ffccc..fc7c2d2 100644 --- a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData.ts @@ -1,8 +1,9 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; + async function executeTCensecQualidadeAtoRemoveData(data: TCensecQualidadeAtoInterface) { const api = new API(); return api.send({ diff --git a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts index cb062b6..566f6bb 100644 --- a/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts +++ b/src/packages/administrativo/data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; + import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; async function executeTCensecQualidadeAtoSaveData(data: TCensecQualidadeAtoInterface) { diff --git a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts index 0a54b86..23f133a 100644 --- a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoRemoveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; -import { Methods } from '@/shared/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'; + +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; async function executeTCensecTipoAtoRemoveData(data: TCensecTipoAtoInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts index 2105832..0f74643 100644 --- a/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts +++ b/src/packages/administrativo/data/TCensecTipoAto/GMedidaTipoSaveData.ts @@ -1,7 +1,8 @@ -import API from '@/shared/services/api/Api'; -import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; -import { Methods } from '@/shared/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'; + +import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; async function executeTCensecTipoAtoSaveData(data: TCensecTipoAtoInterface) { const isUpdate = Boolean(data.censec_tipoato_id); diff --git a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts index 2132440..4a32079 100644 --- a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts +++ b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData.ts @@ -1,7 +1,8 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; async function executeTCensecTipoNaturezaDeleteData( diff --git a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts index d40a679..f73709a 100644 --- a/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts +++ b/src/packages/administrativo/data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData.ts @@ -1,8 +1,9 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; async function executeTCensecTipoNaturezaSaveData( data: TCensecTipoNaturezaInterface, diff --git a/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts b/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts index c4a17b6..8cdfaed 100644 --- a/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelDeleteData.ts @@ -1,7 +1,8 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; async function executeTImovelDeleteData(data: TImovelInterface): Promise { diff --git a/src/packages/administrativo/data/TImovel/TImovelIndexData.ts b/src/packages/administrativo/data/TImovel/TImovelIndexData.ts index 833851c..032e7bd 100644 --- a/src/packages/administrativo/data/TImovel/TImovelIndexData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelIndexData.ts @@ -2,6 +2,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + import { TImovelIndexDataInterface } from '../../interfaces/TImovel/TImovelIndexDataInterface'; async function executeTImovelIndexData( diff --git a/src/packages/administrativo/data/TImovel/TImovelSaveData.ts b/src/packages/administrativo/data/TImovel/TImovelSaveData.ts index 9ee8572..70b141e 100644 --- a/src/packages/administrativo/data/TImovel/TImovelSaveData.ts +++ b/src/packages/administrativo/data/TImovel/TImovelSaveData.ts @@ -1,8 +1,9 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; -import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import ApiResponseInterface from '@/shared/services/api/interfaces/ApiResponseInterface'; + +import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; async function executeTImovelSaveData(data: TImovelInterface): Promise { // Verifica se existe ID da cidade para decidir se é atualização (PUT) ou criação (POST) diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts index 9028b80..d9911ef 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData.ts @@ -1,7 +1,7 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; -import { Methods } from '@/shared/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 executeTImovelUnidadeRuralDeleteData(data: TImovelUnidadeRuralInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts index b168f6d..af322f1 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData.ts @@ -1,5 +1,5 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts index b3747f8..f76c1a5 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData.ts @@ -1,5 +1,5 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; diff --git a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts index 199d4d9..0e0f37d 100644 --- a/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts +++ b/src/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData.ts @@ -1,5 +1,5 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; diff --git a/src/packages/administrativo/data/TMinuta/TMinutaRemoveData.ts b/src/packages/administrativo/data/TMinuta/TMinutaRemoveData.ts index df38fe2..255d4ef 100644 --- a/src/packages/administrativo/data/TMinuta/TMinutaRemoveData.ts +++ b/src/packages/administrativo/data/TMinuta/TMinutaRemoveData.ts @@ -1,7 +1,8 @@ import API from '@/shared/services/api/Api'; -import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; + export default async function TMinutaRemoveData(data: TMinutaInterface) { const api = new API(); diff --git a/src/packages/administrativo/data/TMinuta/TMinutaSaveData.ts b/src/packages/administrativo/data/TMinuta/TMinutaSaveData.ts index bb99663..038cf99 100644 --- a/src/packages/administrativo/data/TMinuta/TMinutaSaveData.ts +++ b/src/packages/administrativo/data/TMinuta/TMinutaSaveData.ts @@ -1,7 +1,8 @@ import API from '@/shared/services/api/Api'; -import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import { TMinutaInterface } from '../../interfaces/TMinuta/TMinutaInterface'; + export default async function TMinutaSaveData(data: TMinutaInterface) { const isUpdate = Boolean(data.t_minuta_id); diff --git a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData.ts b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData.ts index f606704..b4b62b0 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData.ts @@ -1,5 +1,5 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; diff --git a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData.ts b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData.ts index d4f4ebe..f382060 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData.ts @@ -1,5 +1,5 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; diff --git a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData.ts b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData.ts index 0e7ad54..18def41 100644 --- a/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData.ts +++ b/src/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData.ts @@ -1,5 +1,5 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts index 5915c09..3912598 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteIndexData.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; + import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; async function executeTPessoaRepresentanteIndexData(data: TPessoaRepresentanteInterface) { diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts index 35da219..4742a27 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteRemoveData.ts @@ -1,8 +1,9 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; + async function executeTPessoaRepresentanteRemoveData(data: TPessoaRepresentanteInterface) { const api = new API(); return api.send({ diff --git a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts index 19191d7..a4068ae 100644 --- a/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts +++ b/src/packages/administrativo/data/TPessoaRepresentante/TPessoaRepresentanteSaveData.ts @@ -1,8 +1,9 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; + async function executeTPessoaRepresentanteSaveData(data: TPessoaRepresentanteInterface) { // Instancia o cliente da API para enviar a requisição const api = new API(); diff --git a/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts index ddec4b4..83b85f5 100644 --- a/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts +++ b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData.ts @@ -1,9 +1,10 @@ 'use server'; import API from '@/shared/services/api/Api'; -import TTBAndamentoServicoInteface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TTBAndamentoServicoInteface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; + export default async function TTBAndamentoServicoRemoveData( tTBAndamentoServico: TTBAndamentoServicoInteface, ) { diff --git a/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts index ac8bd27..e4d3ce8 100644 --- a/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts +++ b/src/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData.ts @@ -1,9 +1,10 @@ 'use server'; -import API from '@/shared/services/api/Api'; -import TTBAndamentoServicoInteface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; -import { Methods } from '@/shared/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'; + +import TTBAndamentoServicoInteface from '../../interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; async function executeTTBAndamentoServicoSaveData(data: TTBAndamentoServicoInteface) { const api = new API(); diff --git a/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts index e7ac3b9..ae6ecfc 100644 --- a/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts +++ b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData.ts @@ -1,7 +1,8 @@ import API from '@/shared/services/api/Api'; -import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; +import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; + export default async function TTBReconhecimentoTipoDeleteData( data: TTBReconhecimentoTipoInterface, ) { diff --git a/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts index 647ff2b..3af7da5 100644 --- a/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts +++ b/src/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData.ts @@ -1,5 +1,6 @@ import API from '@/shared/services/api/Api'; import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; + import TTBReconhecimentoTipoInterface from '../../interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; export default async function TTBReconhecimentoTipoSaveData(data: TTBReconhecimentoTipoInterface) { diff --git a/src/packages/administrativo/hooks/GCidade/useGCidadeReadHook.ts b/src/packages/administrativo/hooks/GCidade/useGCidadeReadHook.ts index 5b02124..8674de6 100644 --- a/src/packages/administrativo/hooks/GCidade/useGCidadeReadHook.ts +++ b/src/packages/administrativo/hooks/GCidade/useGCidadeReadHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API import { useState } from 'react'; -import { GCidadeIndexService } from '@/packages/administrativo/services/GCidade/GCidadeIndexService'; // Serviço que busca a lista de cidades + import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Interface tipada da cidade +import { GCidadeIndexService } from '@/packages/administrativo/services/GCidade/GCidadeIndexService'; // Serviço que busca a lista de cidades +import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API // Hook customizado para leitura de dados de cidades export const useGCidadeReadHook = () => { diff --git a/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts b/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts index c102c19..84f07c2 100644 --- a/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts +++ b/src/packages/administrativo/hooks/GCidade/useGCidadeRemoveHook.ts @@ -1,6 +1,6 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API -import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Interface tipada da cidade import { GCidadeRemoveData } from '@/packages/administrativo/data/GCidade/GCidadeRemoveData'; // Função que remove a cidade via API +import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; // Interface tipada da cidade +import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API // Hook customizado para remoção de cidades export const useGCidadeRemoveHook = () => { diff --git a/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts b/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts index f0a7ce2..19a90a7 100644 --- a/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts +++ b/src/packages/administrativo/hooks/GCidade/useGCidadeSaveHook.ts @@ -1,7 +1,8 @@ import { useState } from 'react'; -import { useResponse } from '@/shared/components/response/ResponseContext'; + import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; import { GCidadeSaveService } from '@/packages/administrativo/services/GCidade/GCidadeSaveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGCidadeSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoReadHook.ts b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoReadHook.ts index 84bb846..3872bcd 100644 --- a/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoReadHook.ts +++ b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoReadHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; import { GMedidaTipoIndexService } from '../../services/GMedidaTipo/GMedidaTipoIndexService'; diff --git a/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoRemoveHook.ts b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoRemoveHook.ts index 32c2f6e..97e095f 100644 --- a/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoRemoveHook.ts +++ b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoRemoveHook.ts @@ -1,4 +1,5 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; import { GMedidaTipoRemoveService } from '../../services/GMedidaTipo/GMedidaTipoRemoveService'; diff --git a/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoSaveHook.ts b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoSaveHook.ts index d1e7d8e..1269429 100644 --- a/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoSaveHook.ts +++ b/src/packages/administrativo/hooks/GMedidaTipo/useGMedidaTipoSaveHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; import { GMedidaTipoSaveService } from '../../services/GMedidaTipo/GMedidaTipoSaveService'; diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts index 4d5cada..c08ff57 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaDeleteHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; import { GNaturezaDeleteService } from '../../services/GNatureza/GNaturezaDeleteService'; diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts index 6a77c71..6337647 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaFormHook.ts @@ -1,6 +1,7 @@ -import { useForm } from 'react-hook-form'; -import { GNaturezaFormValues, GNaturezaSchema } from '../../schemas/GNatureza/GNaturezaSchema'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + +import { GNaturezaFormValues, GNaturezaSchema } from '../../schemas/GNatureza/GNaturezaSchema'; export function useGNaturezaFormHook(defaults?: Partial) { return useForm({ diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts index d6b8bfe..7054d7f 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaIndexHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; import { GNaturezaIndexService } from '../../services/GNatureza/GNaturezaIndexService'; diff --git a/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts b/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts index d98e25b..2ad3adb 100644 --- a/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts +++ b/src/packages/administrativo/hooks/GNatureza/useGNaturezaSaveHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; import { GNaturezaSaveService } from '../../services/GNatureza/GNaturezaSaveService'; diff --git a/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts index 3039fdf..87e6a99 100644 --- a/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts +++ b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroReadHook.ts @@ -1,9 +1,10 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useMemo, useState } from 'react'; + import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; import { GTBBairroIndexService } from '@/packages/administrativo/services/GTBBairro/GTBBairroIndexService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGTBBairroReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook.ts b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook.ts index a6487e0..2c1e187 100644 --- a/src/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroRemoveHook.ts @@ -1,6 +1,6 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; import { GTBBairroRemoveService } from '@/packages/administrativo/services/GTBBairro/GTBBairroRemoveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGTBBairroRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook.ts b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook.ts index 93cd43a..294d035 100644 --- a/src/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBBairro/useGTBBairroSaveHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; import { GTBBairroSaveService } from '@/packages/administrativo/services/GTBBairro/GTBBairroSaveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGTBBairroSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook.ts b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook.ts index fdfbf0f..a1fe9d0 100644 --- a/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook.ts +++ b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; import { GTBEstadoCivilIndexService } from '../../services/GTBEstadoCivil/GTBEstadoCivilIndexService'; diff --git a/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook.ts b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook.ts index f9837d0..a61b098 100644 --- a/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook.ts @@ -1,4 +1,5 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; import { GTBEstadoCivilRemoveService } from '../../services/GTBEstadoCivil/GTBEstadoCivilRemoveService'; diff --git a/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook.ts b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook.ts index 6165151..b75ecdf 100644 --- a/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; import { GTBEstadoCivilSaveService } from '../../services/GTBEstadoCivil/GTBEstadoCivilSaveService'; diff --git a/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook.ts b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook.ts index 7dd270d..148979c 100644 --- a/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook.ts +++ b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoReadHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; import GTBProfissaoIndexService from '@/packages/administrativo/services/GTBProfissao/GTBProfissaoIndexService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGTBProfissaoReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook.ts b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook.ts index 40be905..74fa96e 100644 --- a/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoRemoveHook.ts @@ -1,6 +1,6 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; import GTBProfissaoRemoveService from '@/packages/administrativo/services/GTBProfissao/GTBProfissaoRemoveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGTBProfissaoRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook.ts b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook.ts index 8efae52..7a0a777 100644 --- a/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBProfissao/useGTBProfissaoSaveHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import GTBProfissaoInterface from '@/packages/administrativo/interfaces/GTBProfissao/GTBProfissaoInterface'; import GTBProfissaoSaveService from '@/packages/administrativo/services/GTBProfissao/GTBProfissaoSaveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGTBProfissaoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensReadHook.ts b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensReadHook.ts index 1016c26..392c62c 100644 --- a/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensReadHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensReadHook.ts @@ -1,6 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import GTBRegimeBensIndexService from '@/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensIndexService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; export const useGTBRegimeBensReadHook = () => { diff --git a/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook.ts b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook.ts index 9ce5d5f..e93ff5b 100644 --- a/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensRemoveHook.ts @@ -1,6 +1,7 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; -import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; + import GTBRegimeBensRemoveData from '../../data/GTBRegimeBens/GTBRegimeBensRemoveData'; +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; export const useGTBRegimeBensRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensSaveHook.ts b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensSaveHook.ts index 6d88299..863f3eb 100644 --- a/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeBens/useGTBRegimeBensSaveHook.ts @@ -1,7 +1,9 @@ import { useState } from 'react'; -import { useResponse } from '@/shared/components/response/ResponseContext'; -import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; + import { GTBRegimeBensSaveService } from '@/packages/administrativo/services/GTBRegimeBens/GTBRegimeBensSaveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + +import GTBRegimeBensInterface from '../../interfaces/GTBRegimeBens/GTBRegimeBensInterface'; export const useGTBRegimeBensSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook.ts b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook.ts index 7dcf538..301fbc2 100644 --- a/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoReadHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; import { GTBRegimeComunhaoIndexService } from '../../services/GTBRegimeComunhao/GTBRegimeComunhaoIndexService'; diff --git a/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook.ts b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook.ts index 713426b..bfddec1 100644 --- a/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoRemoveHook.ts @@ -1,4 +1,5 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; + import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; import { GTBRegimeComunhaoRemoveService } from '../../services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService'; diff --git a/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook.ts b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook.ts index a3cf85c..548b073 100644 --- a/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBRegimeComunhao/useGTBRegimeComunhaoSaveHook.ts @@ -1,5 +1,7 @@ import { useState } from 'react'; + import { useResponse } from '@/shared/components/response/ResponseContext'; + import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; import { GTBRegimeComunhaoSaveService } from '../../services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService'; diff --git a/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts index d9326c0..d752588 100644 --- a/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts +++ b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroReadHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useMemo, useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; import { GTBTipoLogradouroIndexService } from '../../services/GTBTipoLogradouro/GTBTipoLogradouroIndexService'; diff --git a/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook.ts b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook.ts index f49ce1e..edd047f 100644 --- a/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook.ts +++ b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroRemoveHook.ts @@ -1,4 +1,5 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; import { GTBTipoLogradouroRemoveService } from '../../services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService'; diff --git a/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook.ts b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook.ts index 8af49f6..322122c 100644 --- a/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook.ts +++ b/src/packages/administrativo/hooks/GTBTipoLogradouro/useGTBTipoLogradouroSaveHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; import { GTBTipoLogradouroSaveService } from '../../services/GTBTipoLogradouro/GTBTipoLogradouroSaveService'; diff --git a/src/packages/administrativo/hooks/GUF/useGUfReadHook.ts b/src/packages/administrativo/hooks/GUF/useGUfReadHook.ts index 18e9436..88d491b 100644 --- a/src/packages/administrativo/hooks/GUF/useGUfReadHook.ts +++ b/src/packages/administrativo/hooks/GUF/useGUfReadHook.ts @@ -1,9 +1,10 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { use, useState } from 'react'; + import GUfInterface from '@/packages/administrativo/interfaces/GUF/GUfInterface'; import GUfIndexService from '@/packages/administrativo/services/GUF/GUfIndexService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUfReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook.ts b/src/packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook.ts index 9c8f56c..f081677 100644 --- a/src/packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook.ts +++ b/src/packages/administrativo/hooks/GUsuario/useGUsuarioIndexHook.ts @@ -1,9 +1,11 @@ 'use client'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import Usuario from '../../interfaces/GUsuario/GUsuarioInterface'; import GUsuarioIndex from '../../services/GUsuario/GUsuarioIndex'; -import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks.ts b/src/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks.ts index 70c299c..7b66023 100644 --- a/src/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks.ts +++ b/src/packages/administrativo/hooks/GUsuario/useGUsuarioReadHooks.ts @@ -1,9 +1,11 @@ 'use client'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import Usuario from '../../interfaces/GUsuario/GUsuarioInterface'; import GUsuarioRead from '../../services/GUsuario/GUsuarioRead'; -import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioReadHooks = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook.ts b/src/packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook.ts index 5d75e00..bf5106b 100644 --- a/src/packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook.ts +++ b/src/packages/administrativo/hooks/GUsuario/useGUsuarioSaveHook.ts @@ -1,9 +1,11 @@ 'use client'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import Usuario from '../../interfaces/GUsuario/GUsuarioInterface'; import GUsuarioSave from '../../services/GUsuario/GUsuarioSave'; -import { useResponse } from '@/shared/components/response/ResponseContext'; export const useGUsuarioSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook.ts index bf0d023..1a607ac 100644 --- a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook.ts +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoDeleteHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; import { TAtoParteTipoDeleteService } from '../../services/TAtoParteTipo/TAtoParteTipoDeleteService'; diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts index 45246c0..a0597e6 100644 --- a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoFormHook.ts @@ -1,9 +1,10 @@ +import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; + import { TAtoParteTipoFormValues, TAtoParteTipoSchema, } from '../../schemas/TAtoParteTipo/TAtoParteTipoSchema'; -import { zodResolver } from '@hookform/resolvers/zod'; export function useTAtoParteTipoFormHook(defaults?: Partial) { return useForm({ diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook.ts index c411dad..557b420 100644 --- a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook.ts +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoIndexHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; import { TAtoParteTipoIndexService } from '../../services/TAtoParteTipo/TAtoParteTipoIndexService'; diff --git a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook.ts b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook.ts index 9721721..18e4479 100644 --- a/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook.ts +++ b/src/packages/administrativo/hooks/TAtoParteTipo/useTAtoParteTipoSaveHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; import { TAtoParteTipoSaveService } from '../../services/TAtoParteTipo/TAtoParteTipoSaveService'; diff --git a/src/packages/administrativo/hooks/TCensec/useTCensecDeleteHook.ts b/src/packages/administrativo/hooks/TCensec/useTCensecDeleteHook.ts index 5bbb086..2fd1639 100644 --- a/src/packages/administrativo/hooks/TCensec/useTCensecDeleteHook.ts +++ b/src/packages/administrativo/hooks/TCensec/useTCensecDeleteHook.ts @@ -1,4 +1,5 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; import { TCensecDeleteService } from '../../services/TCensec/TCensecDeleteService'; diff --git a/src/packages/administrativo/hooks/TCensec/useTCensecReadHook.ts b/src/packages/administrativo/hooks/TCensec/useTCensecReadHook.ts index 0895a39..34de8ce 100644 --- a/src/packages/administrativo/hooks/TCensec/useTCensecReadHook.ts +++ b/src/packages/administrativo/hooks/TCensec/useTCensecReadHook.ts @@ -1,7 +1,9 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; -import { TCensecIndexService } from '../../services/TCensec/TCensecIndexService'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; +import { TCensecIndexService } from '../../services/TCensec/TCensecIndexService'; export const useTCensecReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TCensec/useTCensecSaveHook.ts b/src/packages/administrativo/hooks/TCensec/useTCensecSaveHook.ts index fb2a950..7702f5d 100644 --- a/src/packages/administrativo/hooks/TCensec/useTCensecSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensec/useTCensecSaveHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; import { TCensecSaveService } from '../../services/TCensec/TCensecSaveService'; diff --git a/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook.ts b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook.ts index d109379..8b54ca7 100644 --- a/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook.ts +++ b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioReadHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { TCensecNaturezaLitigioIndexService } from '@/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioIndexService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTCensecNaturezaLitigioReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook.ts b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook.ts index 57e5ab4..e6c7d0a 100644 --- a/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook.ts +++ b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioRemoveHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; -import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { useState } from 'react'; + import { TCensecNaturezaLitigioRemoveData } from '@/packages/administrativo/data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData'; +import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTCensecNaturezaLitigioRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook.ts b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook.ts index 84b5ba1..16c0d1b 100644 --- a/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensecNaturezaLitigio/useTCensecNaturezaLitigioSaveHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import { TCensecNaturezaLitigioInterface } from '@/packages/administrativo/interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; import { TCensecNaturezaLitigioSaveService } from '@/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTCensecNaturezaLitigioSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook.ts index cecbe09..6502dde 100644 --- a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeDeleteHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; import { TCensecQualidadeDeleteService } from '../../services/TCensecQualidade/TCensecQualidadeDeleteService'; diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts index 4a1c60a..d2007b0 100644 --- a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeHook.ts @@ -1,5 +1,6 @@ -import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + import { TCensecQualidadeFormValues, TCensecQualidadeSchema, diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook.ts index 6593bbe..c99dcf9 100644 --- a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeIndexHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; import { TCensecQualidadeIndexService } from '../../services/TCensecQualidade/TCensecQualidadeIndexService'; diff --git a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook.ts b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook.ts index 81301cb..a2a5242 100644 --- a/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidade/useTCensecQualidadeSaveHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; import { TCensecQualidadeSaveService } from '../../services/TCensecQualidade/TCensecQualidadeSaveService'; diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook.ts index 57f49e1..c4ffb2d 100644 --- a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoDeleteHook.ts @@ -1,4 +1,5 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; import { TCensecQualidadeAtoRemoveService } from '../../services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService'; diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts index 95a4b11..3639270 100644 --- a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoFormHook.ts @@ -1,6 +1,7 @@ // hooks/useTPessoaForm.ts -import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; import { TCensecQualidadeAtoFormValues, diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts index a1daa72..64ada9d 100644 --- a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoIndexHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; import { TCensecQualidadeAtoIndexService } from '../../services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService'; diff --git a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook.ts b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook.ts index 61724a3..8d267b5 100644 --- a/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensecQualidadeAto/useTCensecQualidadeAtoSaveHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; import { TCensecQualidadeAtoSaveService } from '../../services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService'; diff --git a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts index aa7f8bd..8e4bac7 100644 --- a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoReadHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; import { TCensecTipoAtoIndexService } from '../../services/TCensecTipoAto/TCensecTipoAtoIndexService'; diff --git a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts index 6052552..fbe29ad 100644 --- a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook.ts @@ -1,4 +1,5 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; + import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; import { TCensecTipoAtoRemoveService } from '../../services/TCensecTipoAto/TCensecTipoAtoRemoveService'; diff --git a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts index d42ff98..6d70a1f 100644 --- a/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; import { TCensecTipoAtoSaveService } from '../../services/TCensecTipoAto/TCensecTipoAtoSaveService'; diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook.ts index f30e164..5173374 100644 --- a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaDeleteHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; import { TCensecTipoNaturezaDeleteService } from '../../services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService'; diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts index 2367a53..b8642f5 100644 --- a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaFormHook.ts @@ -1,9 +1,10 @@ +import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; + import { TCensecTipoNaturezaFormValues, TCensecTipoNaturezaSchema, } from '../../schemas/TCensecTipoNatureza/TCensecTipoNaturezaSchema'; -import { zodResolver } from '@hookform/resolvers/zod'; export function useTCensecTipoNaturezaFormHook(defaults?: Partial) { return useForm({ diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook.ts index 7e0c9d0..3a0a195 100644 --- a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaIndexHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; import { TCensecTipoNaturezaIndexService } from '../../services/TCensecTipoNatureza/TCensecTipoNaturezaIndexService'; diff --git a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook.ts b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook.ts index fae2805..5ecec65 100644 --- a/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook.ts +++ b/src/packages/administrativo/hooks/TCensecTipoNatureza/useTCensecTipoNaturezaSaveHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; import { TCensecTipoNaturezaSaveService } from '../../services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService'; diff --git a/src/packages/administrativo/hooks/TImovel/useTImovelDeleteHook.ts b/src/packages/administrativo/hooks/TImovel/useTImovelDeleteHook.ts index ee554da..4d3162c 100644 --- a/src/packages/administrativo/hooks/TImovel/useTImovelDeleteHook.ts +++ b/src/packages/administrativo/hooks/TImovel/useTImovelDeleteHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; import { TImovelDeleteService } from '../../services/TImovel/TImovelDeleteService'; diff --git a/src/packages/administrativo/hooks/TImovel/useTImovelFormHook.ts b/src/packages/administrativo/hooks/TImovel/useTImovelFormHook.ts index 68c27bf..f21d924 100644 --- a/src/packages/administrativo/hooks/TImovel/useTImovelFormHook.ts +++ b/src/packages/administrativo/hooks/TImovel/useTImovelFormHook.ts @@ -1,6 +1,7 @@ -import { useForm } from 'react-hook-form'; -import { TImovelFormValues, TImovelSchema } from '../../schemas/TImovel/TImovelSchema'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + +import { TImovelFormValues, TImovelSchema } from '../../schemas/TImovel/TImovelSchema'; export function useTImovelFormHook(defaults?: Partial) { return useForm({ diff --git a/src/packages/administrativo/hooks/TImovel/useTImovelIndexHook.ts b/src/packages/administrativo/hooks/TImovel/useTImovelIndexHook.ts index 6e1e7b7..f4581eb 100644 --- a/src/packages/administrativo/hooks/TImovel/useTImovelIndexHook.ts +++ b/src/packages/administrativo/hooks/TImovel/useTImovelIndexHook.ts @@ -1,9 +1,11 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import { TImovelIndexDataInterface } from '../../interfaces/TImovel/TImovelIndexDataInterface'; +import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; import { TImovelIndexService } from '../../services/TImovel/TImovelIndexService'; export const useTImovelIndexHook = () => { diff --git a/src/packages/administrativo/hooks/TImovel/useTImovelSaveHook.ts b/src/packages/administrativo/hooks/TImovel/useTImovelSaveHook.ts index 649ab50..7747be1 100644 --- a/src/packages/administrativo/hooks/TImovel/useTImovelSaveHook.ts +++ b/src/packages/administrativo/hooks/TImovel/useTImovelSaveHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; import { TImovelSaveService } from '../../services/TImovel/TImovelSaveService'; diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralDeleteHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralDeleteHook.ts index 8ef8325..d37c636 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralDeleteHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralDeleteHook.ts @@ -1,7 +1,9 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; + import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; import { TImovelUnidadeRuralDeleteService } from '@/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService'; -import { useState } from 'react'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + export const useTImovelUnidadeRuralDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook.ts index 4c24936..a16df31 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralFormHook.ts @@ -1,5 +1,6 @@ -import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + import { TImovelUnidadeRuralFormValues, TImovelUnidadeRuralSchema, diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralIndexHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralIndexHook.ts index 9bb9a88..ce70a4a 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralIndexHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralIndexHook.ts @@ -1,10 +1,11 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; -import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; import { useState } from 'react'; -import { TImovelUnidadeRuralIndexService } from '@/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService'; + import TImovelUnidadeInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeInterface'; +import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; +import { TImovelUnidadeRuralIndexService } from '@/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTImovelUnidadeRuralIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook.ts index e700a3a..f0cdc8e 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeRural/useTImovelUnidadeRuralSaveHook.ts @@ -1,9 +1,11 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; + import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; import { TImovelUnidadeRuralSaveService } from '@/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService'; -import { useState } from 'react'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + export const useTImovelUnidadeRuralSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoDeleteHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoDeleteHook.ts index cff9ebc..5a3fd63 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoDeleteHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoDeleteHook.ts @@ -1,7 +1,9 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; + import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; import { TImovelUnidadeUrbanoDeleteService } from '@/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService'; -import { useState } from 'react'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + export const useTImovelUnidadeUrbanoDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook.ts index e549878..994fd61 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoFormHook.ts @@ -1,5 +1,6 @@ -import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + import { TImovelUnidadeUrbanoFormValues, TImovelUnidadeUrbanoSchema, diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoIndexHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoIndexHook.ts index 1a5be7c..b7ee8c0 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoIndexHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoIndexHook.ts @@ -1,10 +1,11 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; -import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; import { useState } from 'react'; -import { TImovelUnidadeUrbanoIndexService } from '@/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService'; + import TImovelUnidadePageInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface'; +import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import { TImovelUnidadeUrbanoIndexService } from '@/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTImovelUnidadeUrbanoIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook.ts b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook.ts index 17ff9e2..6d95c79 100644 --- a/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook.ts +++ b/src/packages/administrativo/hooks/TImovelUnidade/TImovelUnidadeUrbano/useTImovelUnidadeUrbanoSaveHook.ts @@ -1,9 +1,11 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; + import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; import { TImovelUnidadeUrbanoSaveService } from '@/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService'; -import { useState } from 'react'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + export const useTImovelUnidadeUrbanoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook.ts b/src/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook.ts index 92fe503..3cb0c66 100644 --- a/src/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook.ts +++ b/src/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; import TMinutaIndex from '@/packages/administrativo/services/TMinuta/TMinutaIndex'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTMinutaIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TMinuta/useTMinutaReadHook.ts b/src/packages/administrativo/hooks/TMinuta/useTMinutaReadHook.ts index e069501..96772ce 100644 --- a/src/packages/administrativo/hooks/TMinuta/useTMinutaReadHook.ts +++ b/src/packages/administrativo/hooks/TMinuta/useTMinutaReadHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; import TMinutaIndexService from '@/packages/administrativo/services/TMinuta/TMinutaIndexService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTMinutaReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook.ts b/src/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook.ts index 65d9f1f..889f643 100644 --- a/src/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook.ts +++ b/src/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook.ts @@ -1,6 +1,6 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; import TMinutaRemoveService from '@/packages/administrativo/services/TMinuta/TMinutaRemoveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTMinutaRemoveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook.ts b/src/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook.ts index ddfec01..d727651 100644 --- a/src/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook.ts +++ b/src/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface'; import TMinutaSaveService from '@/packages/administrativo/services/TMinuta/TMinutaSaveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTMinutaSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook.ts index b03de96..80f3874 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaDeleteHook.ts @@ -1,6 +1,6 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; import { TPessoaFisicaRemoveService } from '@/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTPessoaFisicaDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook.ts index c1fa4ad..1e5af69 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaFormHook.ts @@ -1,6 +1,7 @@ // hooks/useTPessoaForm.ts -import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + import { TPessoaFisicaFormValues, TPessoaFisicaSchema, diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaIndexHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaIndexHook.ts index c0fc8c5..4b6e609 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaIndexHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaIndexHook.ts @@ -1,7 +1,9 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; + import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; import { TPessoaFisicaIndexService } from '@/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaIndexService'; -import { useState } from 'react'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + export const useTPessoaFisicaIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook.ts index 5b06eb7..3ca7682 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaFisica/useTPessoaFisicaSaveHook.ts @@ -1,9 +1,11 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; + import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; import { TPessoaFisicaSaveService } from '@/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService'; -import { useState } from 'react'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + export const useTPessoaFisicaSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaDeleteHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaDeleteHook.ts index 9dc3306..0719344 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaDeleteHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaDeleteHook.ts @@ -1,6 +1,6 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; import { TPessoaJuridicaRemoveService } from '@/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveService'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTPessoaJuridicaDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook.ts index baf726c..3fdc774 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaFormHook.ts @@ -1,5 +1,6 @@ -import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + import { TPessoaJuridicaFormValues, TPessoaJuridicaSchema, diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaIndexHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaIndexHook.ts index 9299cf2..e612185 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaIndexHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaIndexHook.ts @@ -1,7 +1,9 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; + import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; import { TPessoaJuridicaIndexService } from '@/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaIndexService'; -import { useState } from 'react'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + export const useTPessoaJuridicaIndexHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook.ts b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook.ts index dcfb55e..0c90c86 100644 --- a/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook.ts +++ b/src/packages/administrativo/hooks/TPessoa/TPessoaJuridica/useTPessoaJuridicaSaveHook.ts @@ -1,9 +1,11 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; +import { useState } from 'react'; + import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; import { TPessoaJuridicaSaveService } from '@/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService'; -import { useState } from 'react'; +import { useResponse } from '@/shared/components/response/ResponseContext'; + export const useTPessoaJuridicaSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteDeleteHook.ts b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteDeleteHook.ts index e9f1aee..b83db34 100644 --- a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteDeleteHook.ts +++ b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteDeleteHook.ts @@ -1,4 +1,5 @@ import { useResponse } from '@/shared/components/response/ResponseContext'; + import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; import { TPessoaRepresentanteRemoveService } from '../../services/TPessoaRepresentante/TPessoaRepresentanteRemoveService'; diff --git a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook.ts b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook.ts index 503b237..51e2f57 100644 --- a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook.ts +++ b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook.ts @@ -1,6 +1,7 @@ // hooks/useTPessoaForm.ts -import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; +import { useForm } from 'react-hook-form'; + import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; import { TPessoaRepresentanteFormValues, diff --git a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook.ts b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook.ts index f3fd703..23b3b20 100644 --- a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook.ts +++ b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteIndexHook.ts @@ -1,5 +1,7 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; import { TPessoaRepresentanteIndexService } from '../../services/TPessoaRepresentante/TPessoaRepresentanteIndexService'; diff --git a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteSaveHook.ts b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteSaveHook.ts index ba323ca..3ca68db 100644 --- a/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteSaveHook.ts +++ b/src/packages/administrativo/hooks/TPessoaRepresentante/useTPessoaRepresentanteSaveHook.ts @@ -1,7 +1,9 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; + +import { useResponse } from '@/shared/components/response/ResponseContext'; + import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; import { TPessoaRepresentanteSaveService } from '../../services/TPessoaRepresentante/TPessoaRepresentanteSaveService'; diff --git a/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook.ts b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook.ts index 78fdd91..b131b90 100644 --- a/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook.ts +++ b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoDeleteHook.ts @@ -1,7 +1,8 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; + import TTBAndamentoServicoRemoveData from '@/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoRemoveData'; +import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTTBAndamentoServicoDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook.ts b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook.ts index 4755167..0eedd19 100644 --- a/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook.ts +++ b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoReadHook.ts @@ -1,9 +1,10 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; + import TTBAndamentoServicoIndexData from '@/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoIndexData'; +import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTTBAndamentoServicoReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook.ts b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook.ts index cf0496a..fd16528 100644 --- a/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook.ts +++ b/src/packages/administrativo/hooks/TTBAndamentoServico/useTTBAndamentoServicoSaveHook.ts @@ -1,9 +1,10 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; + import { TTBAndamentoServicoSaveData } from '@/packages/administrativo/data/TTBAndamentoServico/TTBAndamentoServicoSaveData'; +import TTBAndamentoServicoInteface from '@/packages/administrativo/interfaces/TTBAndamentoServico/TTBAndamentoServicoInterface'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTTBAndamentoServicoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook.ts b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook.ts index d04c23f..82508e9 100644 --- a/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook.ts +++ b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoDeleteHook.ts @@ -1,6 +1,6 @@ -import { useResponse } from '@/shared/components/response/ResponseContext'; -import TTBReconhecimentoTipoInterface from '@/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; import TTBReconhecimentoTipoDeleteData from '@/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoDeleteData'; +import TTBReconhecimentoTipoInterface from '@/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTTBReconhecimentoTipoDeleteHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook.ts b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook.ts index a6fb552..2179818 100644 --- a/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook.ts +++ b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook.ts @@ -1,9 +1,10 @@ 'use client'; +import { useState } from 'react'; + +import TTBReconhecimentoTipoIndexData from '@/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData'; import ITTTBReconhecimentoTipo from '@/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; import { useResponse } from '@/shared/components/response/ResponseContext'; -import { useState } from 'react'; -import TTBReconhecimentoTipoIndexData from '@/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoIndexData'; export const useTTBReconhecimentoTipoReadHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook.ts b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook.ts index 4988562..d6e4fef 100644 --- a/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook.ts +++ b/src/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoSaveHook.ts @@ -1,9 +1,10 @@ 'use client'; -import { useResponse } from '@/shared/components/response/ResponseContext'; import { useState } from 'react'; -import ITTTBReconhecimentoTipo from '@/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; + import TTBReconhecimentoTipoSaveData from '@/packages/administrativo/data/TTBReconhecimentoTipo/TTBReconhecimentoTipoSaveData'; +import ITTTBReconhecimentoTipo from '@/packages/administrativo/interfaces/TTBREconhecimentoTipo/TTBReconhecimentoTipoInterface'; +import { useResponse } from '@/shared/components/response/ResponseContext'; export const useTTBReconhecimentoTipoSaveHook = () => { const { setResponse } = useResponse(); diff --git a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural.ts b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural.ts index 1840735..824c41c 100644 --- a/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural.ts +++ b/src/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural.ts @@ -1,4 +1,5 @@ import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; + import TImovelUnidadeInterface from '../TImovelUnidadeInterface'; export interface TImovelUnidadeRuralInterface extends TImovelUnidadeInterface { diff --git a/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts b/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts index 257dadc..abe58f7 100644 --- a/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts +++ b/src/packages/administrativo/schemas/TCensecQualidade/TCensecQualdiadeSchema.ts @@ -1,6 +1,7 @@ +import z from 'zod'; + import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; -import z from 'zod'; export const TCensecQualidadeSchema = z.object({ censec_qualidade_id: z.number().optional(), diff --git a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema.ts b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema.ts index faece55..f8e6c9d 100644 --- a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema.ts +++ b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSchema.ts @@ -1,7 +1,9 @@ import { z } from 'zod'; -import { TImovelUnidadeSchema } from '../TImovelUnidadeSchema'; + import { SituacoesEnum } from '@/shared/enums/SituacoesEnum'; +import { TImovelUnidadeSchema } from '../TImovelUnidadeSchema'; + export const TImovelUnidadeRuralSchema = TImovelUnidadeSchema.extend({ galpao: z.string().optional(), nao_se_aplica: z.boolean().optional(), diff --git a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema.ts b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema.ts index 11b1d32..a076731 100644 --- a/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema.ts +++ b/src/packages/administrativo/schemas/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSchema.ts @@ -1,4 +1,5 @@ import { z } from 'zod'; + import { TImovelUnidadeSchema } from '../TImovelUnidadeSchema'; export const TImovelUnidadeUrbanoSchema = TImovelUnidadeSchema.extend({ diff --git a/src/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema.ts b/src/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema.ts index 96ac7aa..52f418d 100644 --- a/src/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema.ts +++ b/src/packages/administrativo/schemas/TPessoa/TPessoaFisicaSchema.ts @@ -1,6 +1,7 @@ -import { TPessoaSchema } from './TPessoaSchema'; import z from 'zod'; +import { TPessoaSchema } from './TPessoaSchema'; + export const TPessoaFisicaSchema = TPessoaSchema.extend({ nacionalidade: z.string().optional(), tb_documentotipo_id: z.number().optional(), diff --git a/src/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema.ts b/src/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema.ts index 4c10a23..0942444 100644 --- a/src/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema.ts +++ b/src/packages/administrativo/schemas/TPessoa/TPessoaJuridicaSchema.ts @@ -1,6 +1,7 @@ -import { TPessoaSchema } from './TPessoaSchema'; import z from 'zod'; +import { TPessoaSchema } from './TPessoaSchema'; + export const TPessoaJuridicaSchema = TPessoaSchema.extend({ razao_social: z.string().optional(), nome_fantasia: z.string().optional(), diff --git a/src/packages/administrativo/services/GCidade/GCidadeRemoveService.ts b/src/packages/administrativo/services/GCidade/GCidadeRemoveService.ts index d90cecd..93ccd2f 100644 --- a/src/packages/administrativo/services/GCidade/GCidadeRemoveService.ts +++ b/src/packages/administrativo/services/GCidade/GCidadeRemoveService.ts @@ -1,8 +1,8 @@ -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 '@/packages/administrativo/data/GCidade/GCidadeRemoveData'; // Função que remove os dados da cidade via API import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Interface tipada da cidade // Função assíncrona que executa a remoção de uma cidade diff --git a/src/packages/administrativo/services/GCidade/GCidadeSaveService.ts b/src/packages/administrativo/services/GCidade/GCidadeSaveService.ts index e8a9fe6..3dbf9b4 100644 --- a/src/packages/administrativo/services/GCidade/GCidadeSaveService.ts +++ b/src/packages/administrativo/services/GCidade/GCidadeSaveService.ts @@ -1,11 +1,11 @@ // Função que envolve qualquer ação assíncrona para capturar e tratar erros do cliente -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Função que salva os dados da cidade via API (ou mock) import { GCidadeSaveData } from '@/packages/administrativo/data/GCidade/GCidadeSaveData'; // Interface tipada da cidade import GCidadeInterface from '@/packages/administrativo/interfaces/GCidade/GCidadeInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; // Função assíncrona que executa o salvamento de uma cidade async function executeGCidadeSaveService(data: GCidadeInterface) { diff --git a/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoRemoveService.ts b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoRemoveService.ts index 1269fc4..17d6d6c 100644 --- a/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoRemoveService.ts +++ b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoRemoveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GMedidaTipoRemoveData } from '../../data/GMedidoTipo/GMedidaTipoRemoveData'; import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; diff --git a/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoSaveService.ts b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoSaveService.ts index 28f05fe..261d151 100644 --- a/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoSaveService.ts +++ b/src/packages/administrativo/services/GMedidaTipo/GMedidaTipoSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GMedidaTipoSaveData } from '../../data/GMedidoTipo/GMedidaTipoSaveData'; import { GMedidaTipoInterface } from '../../interfaces/GMedidaTipo/GMedidaTipoInterface'; diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts index aafc8cf..a00d28e 100644 --- a/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts +++ b/src/packages/administrativo/services/GNatureza/GNaturezaDeleteService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GNaturezaDeleteData } from '../../data/GNatureza/GNaturezaDeleteData'; import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts index b6fb881..872dbcc 100644 --- a/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts +++ b/src/packages/administrativo/services/GNatureza/GNaturezaIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GNaturezaIndexData } from '../../data/GNatureza/GNaturezaIndexData'; import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; diff --git a/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts b/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts index 6555e59..dd18968 100644 --- a/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts +++ b/src/packages/administrativo/services/GNatureza/GNaturezaSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GNaturezaSaveData } from '../../data/GNatureza/GNaturezaSaveData'; import GNaturezaInterface from '../../interfaces/GNatureza/GNaturezaInterface'; diff --git a/src/packages/administrativo/services/GTBBairro/GTBBairroRemoveService.ts b/src/packages/administrativo/services/GTBBairro/GTBBairroRemoveService.ts index a51b2ee..60ce279 100644 --- a/src/packages/administrativo/services/GTBBairro/GTBBairroRemoveService.ts +++ b/src/packages/administrativo/services/GTBBairro/GTBBairroRemoveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBBairroRemoveData } from '@/packages/administrativo/data/GTBBairro/GTBBairroRemoveData'; import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBBairroRemoveService(data: GTBBairroInterface) { const response = await GTBBairroRemoveData(data); diff --git a/src/packages/administrativo/services/GTBBairro/GTBBairroSaveService.ts b/src/packages/administrativo/services/GTBBairro/GTBBairroSaveService.ts index 1223263..1dfa494 100644 --- a/src/packages/administrativo/services/GTBBairro/GTBBairroSaveService.ts +++ b/src/packages/administrativo/services/GTBBairro/GTBBairroSaveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { GTBBairroSaveData } from '@/packages/administrativo/data/GTBBairro/GTBBairroSaveData'; import { GTBBairroInterface } from '@/packages/administrativo/interfaces/GTBBairro/GTBBairroInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeGTBBairroSaveService(data: GTBBairroInterface) { const response = await GTBBairroSaveData(data); diff --git a/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilRemoveService.ts b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilRemoveService.ts index adf158d..198a476 100644 --- a/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilRemoveService.ts +++ b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilRemoveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GTBEstadoCivilSaveData } from '../../data/GTBEstadoCivil/GTBEstadoCivilSaveData'; import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; diff --git a/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilSaveService.ts b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilSaveService.ts index 2e27c40..36de54d 100644 --- a/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilSaveService.ts +++ b/src/packages/administrativo/services/GTBEstadoCivil/GTBEstadoCivilSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GTBEstadoCivilSaveData } from '../../data/GTBEstadoCivil/GTBEstadoCivilSaveData'; import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface'; diff --git a/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService.ts b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService.ts index 51ac03f..4b41002 100644 --- a/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService.ts +++ b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoRemoveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import GTBRegimeComunhaoRemoveData from '../../data/GTRegimeComunhao/GTBRegimeComunhaoRemoveData'; import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; diff --git a/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService.ts b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService.ts index 546dd08..d226fdb 100644 --- a/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService.ts +++ b/src/packages/administrativo/services/GTBRegimeComunhao/GTBRegimeComunhaoSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import GTBRegimeComunhaoSaveData from '../../data/GTRegimeComunhao/GTBRegimeComunhaoSaveData'; import GTBRegimeComunhaoInterface from '../../interfaces/GTBRegimeComunhao/GTBRegimeComunhaoInterface'; diff --git a/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService.ts b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService.ts index 64894be..b206a60 100644 --- a/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService.ts +++ b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroRemoveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GTBTipoLogradouroRemoveData } from '../../data/GTBTipoLogradouro/GTBTipoLogradouroRemoveData'; import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; diff --git a/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroSaveService.ts b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroSaveService.ts index 674c8aa..0713276 100644 --- a/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroSaveService.ts +++ b/src/packages/administrativo/services/GTBTipoLogradouro/GTBTipoLogradouroSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { GTBTipoLogradouroSaveData } from '../../data/GTBTipoLogradouro/GTBTipoLogradouroSaveData'; import { GTBTipoLogradouroInterface } from '../../interfaces/GTBTipoLogradouro/GTBTipoLogradouroInterface'; diff --git a/src/packages/administrativo/services/GUsuario/GUsuarioLogin.ts b/src/packages/administrativo/services/GUsuario/GUsuarioLogin.ts index 7729f6d..4ed88b4 100644 --- a/src/packages/administrativo/services/GUsuario/GUsuarioLogin.ts +++ b/src/packages/administrativo/services/GUsuario/GUsuarioLogin.ts @@ -1,9 +1,9 @@ 'use server'; import { cookies } from 'next/headers'; +import { redirect } from 'next/navigation'; import GUsuarioLoginData from '../../data/GUsuario/GUsuarioLoginData'; -import { redirect } from 'next/navigation'; export default async function GUsuarioLoginService(form: any) { // Obtem a resposta da requisição diff --git a/src/packages/administrativo/services/GUsuario/GUsuarioLogoutService.ts b/src/packages/administrativo/services/GUsuario/GUsuarioLogoutService.ts index c281fe6..4359466 100644 --- a/src/packages/administrativo/services/GUsuario/GUsuarioLogoutService.ts +++ b/src/packages/administrativo/services/GUsuario/GUsuarioLogoutService.ts @@ -1,7 +1,6 @@ 'use server'; import { cookies } from 'next/headers'; - import { redirect } from 'next/navigation'; export default async function GUsuarioLogoutService(token: string) { diff --git a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoDeleteService.ts b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoDeleteService.ts index 8ed5fc3..78dfaff 100644 --- a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoDeleteService.ts +++ b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoDeleteService.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; + import { TAtoParteTipoDeleteData } from '../../data/TAtoTipoParte/TAtoTipoParteDeleteData'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; async function executeTAtoParteTipoDeleteService(data: TAtoParteTipoInterface) { const response = await TAtoParteTipoDeleteData(data); diff --git a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts index f83054f..6df62d9 100644 --- a/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts +++ b/src/packages/administrativo/services/TAtoParteTipo/TAtoParteTipoSaveService.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; + import { TAtoParteTipoSaveData } from '../../data/TAtoTipoParte/TAtoTipoParteSaveData'; +import TAtoParteTipoInterface from '../../interfaces/TAtoParteTipo/TAtoParteTipoInterface'; async function executeTAtoParteTipoSaveService(data: TAtoParteTipoInterface) { const response = await TAtoParteTipoSaveData(data); diff --git a/src/packages/administrativo/services/TCensec/TCensecDeleteService.ts b/src/packages/administrativo/services/TCensec/TCensecDeleteService.ts index c043606..bae813c 100644 --- a/src/packages/administrativo/services/TCensec/TCensecDeleteService.ts +++ b/src/packages/administrativo/services/TCensec/TCensecDeleteService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecDeleteData } from '../../data/TCensec/TCensecDeleteData'; import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; diff --git a/src/packages/administrativo/services/TCensec/TCensecSaveService.ts b/src/packages/administrativo/services/TCensec/TCensecSaveService.ts index 03c5a88..74dee66 100644 --- a/src/packages/administrativo/services/TCensec/TCensecSaveService.ts +++ b/src/packages/administrativo/services/TCensec/TCensecSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecSaveData } from '../../data/TCensec/TCensecSaveData'; import TCensecInterface from '../../interfaces/TCensec/TCensecInterface'; diff --git a/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveService.ts b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveService.ts index 804fe85..aba50e9 100644 --- a/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveService.ts +++ b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveService.ts @@ -1,6 +1,7 @@ +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecNaturezaLitigioRemoveData } from '../../data/TCensecNaturezaLitigio/TCensecNaturezaLitigioRemoveData'; import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTCensecNaturezaLitigioRemoveService(data: TCensecNaturezaLitigioInterface) { const response = await TCensecNaturezaLitigioRemoveData(data); diff --git a/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService.ts b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService.ts index 58304f8..6fd8105 100644 --- a/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService.ts +++ b/src/packages/administrativo/services/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecNaturezaLitigioSaveData } from '../../data/TCensecNaturezaLitigio/TCensecNaturezaLitigioSaveData'; import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface'; diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts index ca27b9d..e6b71da 100644 --- a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeDeleteService.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; + import { TCensecQualidadeDeleteData } from '../../data/TCensecQualidade/TCensecQualidadeDeleteData'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; async function executeTCensecQualidadeDeleteService(data: TCensecQualidadeInterface) { const response = await TCensecQualidadeDeleteData(data); diff --git a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts index ac62c0e..519380b 100644 --- a/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts +++ b/src/packages/administrativo/services/TCensecQualidade/TCensecQualidadeSaveService.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; + import { TCensecQualidadeSaveData } from '../../data/TCensecQualidade/TCensecQualidadeSaveData'; +import TCensecQualidadeInterface from '../../interfaces/TCensecQualidade/TCensecQualidadeInterface'; async function executeTCensecQualidadeSaveService(data: TCensecQualidadeInterface) { const response = await TCensecQualidadeSaveData(data); diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts index 7694fd5..4023e28 100644 --- a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecQualidadeAtoIndexData } from '../../data/TCensecQualidadeAto/TCensecQualidadeAtoIndexData'; import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts index 64e1c7b..359188d 100644 --- a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoRemoveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecQualidadeAtoRemoveData } from '../../data/TCensecQualidadeAto/TCensecQualidadeAtoRemoveData'; import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; diff --git a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts index ae6fcab..680850c 100644 --- a/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts +++ b/src/packages/administrativo/services/TCensecQualidadeAto/TCensecQualidadeAtoSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecQualidadeAtoSaveData } from '../../data/TCensecQualidadeAto/TCensecQualidadeAtoSaveData'; import TCensecQualidadeAtoInterface from '../../interfaces/TCensecQualidadeAto/TCensecQualidadeAtoInterface'; diff --git a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts index d59dda1..f1a8de2 100644 --- a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoRemoveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecTipoAtoRemoveData } from '../../data/TCensecTipoAto/GMedidaTipoRemoveData'; import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; diff --git a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts index 65fd928..034935c 100644 --- a/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts +++ b/src/packages/administrativo/services/TCensecTipoAto/TCensecTipoAtoSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TCensecTipoAtoSaveData } from '../../data/TCensecTipoAto/GMedidaTipoSaveData'; import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface'; diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts index b79178b..c4553c7 100644 --- a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaDeleteService.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; + import { TCensecTipoNaturezaDeleteData } from '../../data/TCensecTipoNatureza/TCensecTipoNaturezaDeleteData'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; async function executeTCensecTipoNaturezaDeleteService(data: TCensecTipoNaturezaInterface) { const response = await TCensecTipoNaturezaDeleteData(data); diff --git a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts index 368adc5..077b9b9 100644 --- a/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts +++ b/src/packages/administrativo/services/TCensecTipoNatureza/TCensecTipoNaturezaSaveService.ts @@ -1,6 +1,7 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; + import { TCensecTipoNaturezaSaveData } from '../../data/TCensecTipoNatureza/TCensecTipoNaturezaSaveData'; +import TCensecTipoNaturezaInterface from '../../interfaces/TCensecTipoNatureza/TCensecTipoNaturezaInterface'; async function executeTCensecTipoNaturezaSaveService(data: TCensecTipoNaturezaInterface) { const response = await TCensecTipoNaturezaSaveData(data); diff --git a/src/packages/administrativo/services/TImovel/TImovelDeleteService.ts b/src/packages/administrativo/services/TImovel/TImovelDeleteService.ts index 555cc03..9e1d57c 100644 --- a/src/packages/administrativo/services/TImovel/TImovelDeleteService.ts +++ b/src/packages/administrativo/services/TImovel/TImovelDeleteService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TImovelDeleteData } from '../../data/TImovel/TImovelDeleteData'; import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; diff --git a/src/packages/administrativo/services/TImovel/TImovelIndexService.ts b/src/packages/administrativo/services/TImovel/TImovelIndexService.ts index 63af403..c727a58 100644 --- a/src/packages/administrativo/services/TImovel/TImovelIndexService.ts +++ b/src/packages/administrativo/services/TImovel/TImovelIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TImovelIndexData } from '../../data/TImovel/TImovelIndexData'; import { TImovelIndexDataInterface } from '../../interfaces/TImovel/TImovelIndexDataInterface'; diff --git a/src/packages/administrativo/services/TImovel/TImovelSaveService.ts b/src/packages/administrativo/services/TImovel/TImovelSaveService.ts index 746d2a3..dddd745 100644 --- a/src/packages/administrativo/services/TImovel/TImovelSaveService.ts +++ b/src/packages/administrativo/services/TImovel/TImovelSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TImovelSaveData } from '../../data/TImovel/TImovelSaveData'; import TImovelInterface from '../../interfaces/TImovel/TImovelInterface'; diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService.ts index 296a3cc..204ab10 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeRuralDeleteData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralDeleteData'; import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTImovelUnidadeRuralDeleteService(data: TImovelUnidadeRuralInterface) { const response = await TImovelUnidadeRuralDeleteData(data); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService.ts index eade373..fb89617 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeRuralIndexData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralIndexData'; import TImovelUnidadeInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; export default async function executeTImovelUnidadeRuralIndexService( data: TImovelUnidadeInterface, diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService.ts index e2c74cb..17fffda 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeRuralSaveData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRuralSaveData'; import { TImovelUnidadeRuralInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeRural/TImovelUnidadeRural'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTImovelUnidadeRuralSaveService(data: TImovelUnidadeRuralInterface) { const response = await TImovelUnidadeRuralSaveData(data); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService.ts index 66e6d18..237287f 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; -import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; import { TImovelUnidadeUrbanoDeleteData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoDeleteData'; +import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTImovelUnidadeUrbanoDeleteService(data: TImovelUnidadeUrbanoInterface) { const response = await TImovelUnidadeUrbanoDeleteData(data); diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService.ts index 738e9eb..aa0d137 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeUrbanoIndexData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoIndexData'; import TImovelUnidadePageInterface from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadePageInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; export default async function executeTImovelUnidadeUrbanoIndexService( data: TImovelUnidadePageInterface, diff --git a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService.ts b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService.ts index 415eea6..23bacb3 100644 --- a/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService.ts +++ b/src/packages/administrativo/services/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TImovelUnidadeUrbanoSaveData } from '@/packages/administrativo/data/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoSaveData'; import { TImovelUnidadeUrbanoInterface } from '@/packages/administrativo/interfaces/TImovelUnidade/TImovelUnidadeUrbano/TImovelUnidadeUrbanoInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTImovelUnidadeUrbanoSaveService(data: TImovelUnidadeUrbanoInterface) { const response = await TImovelUnidadeUrbanoSaveData(data); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService.ts b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService.ts index 6e0d4f4..2f8d4ef 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaRemoveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TPessoaFisicaRemoveData } from '@/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaRemoveData'; import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaFisicaRemoveService(data: TPessoaFisicaInterface) { const response = await TPessoaFisicaRemoveData(data); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService.ts b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService.ts index 1f0aa91..7c51c78 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaFisica/TPessoaFisicaSaveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TPessoaFisicaSaveData } from '@/packages/administrativo/data/TPessoa/TPessoaFisica/TPessoaFisicaSaveData'; import TPessoaFisicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaFisica/TPessoaFisicaInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaFisicaSaveService(data: TPessoaFisicaInterface) { console.log('TPessoaFisicaSaveService', data); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveService.ts b/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveService.ts index 8cbdf29..5c279f6 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TPessoaJuridicaRemoveData } from '@/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaRemoveData'; import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaJuridicaRemoveService(data: TPessoaJuridicaInterface) { const response = TPessoaJuridicaRemoveData(data); diff --git a/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService.ts b/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService.ts index e6f4f52..20885fc 100644 --- a/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService.ts +++ b/src/packages/administrativo/services/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveService.ts @@ -1,6 +1,6 @@ -import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; import { TPessoaJuridicaSaveData } from '@/packages/administrativo/data/TPessoa/TPessoaJuridica/TPessoaJuridicaSaveData'; import TPessoaJuridicaInterface from '@/packages/administrativo/interfaces/TPessoa/TPessoaJuridica/TPessoaJuridicaInterface'; +import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; async function executeTPessoaJuridicaSaveService(data: TPessoaJuridicaInterface) { const response = TPessoaJuridicaSaveData(data); diff --git a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteIndexService.ts b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteIndexService.ts index dd69bf9..46803a3 100644 --- a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteIndexService.ts +++ b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteIndexService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TPessoaRepresentanteIndexData } from '../../data/TPessoaRepresentante/TPessoaRepresentanteIndexData'; import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; diff --git a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteRemoveService.ts b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteRemoveService.ts index fd0737c..5e156b3 100644 --- a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteRemoveService.ts +++ b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteRemoveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TPessoaRepresentanteRemoveData } from '../../data/TPessoaRepresentante/TPessoaRepresentanteRemoveData'; import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; diff --git a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteSaveService.ts b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteSaveService.ts index 033e037..fe67f6b 100644 --- a/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteSaveService.ts +++ b/src/packages/administrativo/services/TPessoaRepresentante/TPessoaRepresentanteSaveService.ts @@ -1,4 +1,5 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; + import { TPessoaRepresentanteSaveData } from '../../data/TPessoaRepresentante/TPessoaRepresentanteSaveData'; import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface'; diff --git a/src/shared/actions/form/ResetFormIfData.ts b/src/shared/actions/form/ResetFormIfData.ts index 48093ee..0a29f45 100644 --- a/src/shared/actions/form/ResetFormIfData.ts +++ b/src/shared/actions/form/ResetFormIfData.ts @@ -1,4 +1,5 @@ import { UseFormReturn, FieldValues } from 'react-hook-form'; + import normalizeFormData from './normalizeFormData'; /** diff --git a/src/shared/components/confirmacao/ConfirmacaoSelect.tsx b/src/shared/components/confirmacao/ConfirmacaoSelect.tsx index 468656a..18c0511 100644 --- a/src/shared/components/confirmacao/ConfirmacaoSelect.tsx +++ b/src/shared/components/confirmacao/ConfirmacaoSelect.tsx @@ -1,3 +1,7 @@ +import { Command } from 'cmdk'; +import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; +import React from 'react'; + import { Button } from '@/components/ui/button'; import { CommandEmpty, @@ -10,9 +14,6 @@ import { FormControl } from '@/components/ui/form'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; import { ConfirmacaoEnum } from '@/shared/enums/ConfirmacaoEnum'; -import { Command } from 'cmdk'; -import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react'; -import React from 'react'; export default function ConfirmacaoSelect({ field }: any) { const [open, setOpen] = React.useState(false); diff --git a/src/shared/components/dataTable/DataTable.tsx b/src/shared/components/dataTable/DataTable.tsx index 202a080..44e8baa 100644 --- a/src/shared/components/dataTable/DataTable.tsx +++ b/src/shared/components/dataTable/DataTable.tsx @@ -1,6 +1,5 @@ 'use client'; -import React from 'react'; import { ColumnDef, flexRender, @@ -14,15 +13,17 @@ import { VisibilityState, RowSelectionState, } from '@tanstack/react-table'; +import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from 'lucide-react'; +import React from 'react'; import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; +import { Input } from '@/components/ui/input'; import { Table, TableBody, @@ -31,7 +32,8 @@ import { TableHeader, TableRow, } from '@/components/ui/table'; -import { ChevronLeftIcon, ChevronRightIcon, EyeIcon } from 'lucide-react'; + + import DataTableInterface from './interfaces/DataTableInterface'; export function DataTable({ diff --git a/src/shared/components/dataTable/SortableHeader.tsx b/src/shared/components/dataTable/SortableHeader.tsx index 4b30726..5e6706c 100644 --- a/src/shared/components/dataTable/SortableHeader.tsx +++ b/src/shared/components/dataTable/SortableHeader.tsx @@ -1,6 +1,7 @@ -import { Button } from '@/components/ui/button'; import { ArrowUpDownIcon } from 'lucide-react'; +import { Button } from '@/components/ui/button'; + export const SortableHeader = (label: string, column: any) => (