From e9e0607e78e358b9abc30fe9e9b7e528623fa44e Mon Sep 17 00:00:00 2001 From: Monika Stefanova Date: Sat, 13 Dec 2025 19:43:41 +0100 Subject: [PATCH 1/5] initial commit #53" --- .../app/embalse-provincia/array-provincias.ts | 52 + front/src/app/embalse-provincia/page.tsx | 19 +- package-lock.json | 943 ++++++++++++++++-- 3 files changed, 918 insertions(+), 96 deletions(-) create mode 100644 front/src/app/embalse-provincia/array-provincias.ts diff --git a/front/src/app/embalse-provincia/array-provincias.ts b/front/src/app/embalse-provincia/array-provincias.ts new file mode 100644 index 0000000..5c0e25a --- /dev/null +++ b/front/src/app/embalse-provincia/array-provincias.ts @@ -0,0 +1,52 @@ +export const provincias = [ + "Álava", + "Albacete", + "Alicante", + "Almería", + "Asturias", + "Ávila", + "Badajoz", + "Baleares", + "Barcelona", + "Burgos", + "Cáceres", + "Cádiz", + "Cantabria", + "Castellón", + "Ciudad Real", + "Córdoba", + "La Coruña", + "Cuenca", + "Gerona", + "Granada", + "Guadalajara", + "Guipúzcoa", + "Huelva", + "Huesca", + "Jaén", + "La Rioja", + "Las Palmas", + "León", + "Lérida", + "Lugo", + "Madrid", + "Málaga", + "Murcia", + "Navarra", + "Orense", + "Palencia", + "Pontevedra", + "Salamanca", + "Santa Cruz de Tenerife", + "Segovia", + "Sevilla", + "Soria", + "Tarragona", + "Teruel", + "Toledo", + "Valencia", + "Valladolid", + "Vizcaya", + "Zamora", + "Zaragoza", +]; diff --git a/front/src/app/embalse-provincia/page.tsx b/front/src/app/embalse-provincia/page.tsx index 8c502d9..348e1a0 100644 --- a/front/src/app/embalse-provincia/page.tsx +++ b/front/src/app/embalse-provincia/page.tsx @@ -1,12 +1,21 @@ import Link from "next/link"; +import { provincias } from "./array-provincias"; export default function EmbalsesProvinciaPage() { return ( -
-

Embalse por provincias

- - Málaga - +
+

Embalses por provincias

+
+ {provincias.map((provincia) => ( + + {provincia} + + ))} +
); } diff --git a/package-lock.json b/package-lock.json index cc9078a..1159d5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -254,6 +254,74 @@ "resolved": "packages/db", "link": true }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/darwin-arm64": { "version": "0.25.9", "cpu": [ @@ -263,7 +331,364 @@ "license": "MIT", "optional": true, "os": [ - "darwin" + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" ], "engines": { "node": ">=18" @@ -469,166 +894,432 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.3.1", + "license": "MIT", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, + "node_modules/@next/env": { + "version": "15.5.0", + "license": "MIT" + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "15.5.0", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.0.tgz", + "integrity": "sha512-s2Nk6ec+pmYmAb/utawuURy7uvyYKDk+TRE5aqLRsdnj3AhwC9IKUBmhfnLmY/+P+DnwqpeXEFIKe9tlG0p6CA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.0.tgz", + "integrity": "sha512-mGlPJMZReU4yP5fSHjOxiTYvZmwPSWn/eF/dcg21pwfmiUCKS1amFvf1F1RkLHPIMPfocxLViNWFvkvDB14Isg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.0.tgz", + "integrity": "sha512-biWqIOE17OW/6S34t1X8K/3vb1+svp5ji5QQT/IKR+VfM3B7GvlCwmz5XtlEan2ukOUf9tj2vJJBffaGH4fGRw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.0.tgz", + "integrity": "sha512-zPisT+obYypM/l6EZ0yRkK3LEuoZqHaSoYKj+5jiD9ESHwdr6QhnabnNxYkdy34uCigNlWIaCbjFmQ8FY5AlxA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.0.tgz", + "integrity": "sha512-+t3+7GoU9IYmk+N+FHKBNFdahaReoAktdOpXHFIPOU1ixxtdge26NgQEEkJkCw2dHT9UwwK5zw4mAsURw4E8jA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.0.tgz", + "integrity": "sha512-d8MrXKh0A+c9DLiy1BUFwtg3Hu90Lucj3k6iKTUdPOv42Ve2UiIG8HYi3UAb8kFVluXxEfdpCoPPCSODk5fDcw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.0.tgz", + "integrity": "sha512-Fe1tGHxOWEyQjmygWkkXSwhFcTJuimrNu52JEuwItrKJVV4iRjbWp9I7zZjwqtiNnQmxoEvoisn8wueFLrNpvQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.4.tgz", + "integrity": "sha512-B2wfzCJ+ps/OBzRjeds7DlJumCU3rXMxJJS1vzURyj7+KBHGONm7c9q1TfdBl4vCuNMkDvARn3PBl2wZzuR5mw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.4.tgz", + "integrity": "sha512-FGJYXvYdn8Bs6lAlBZYT5n+4x0ciEp4cmttsvKAZc/c8/JiPaQK8u0c/86vKX8lA7OY/+37lIQSe0YoAImvBAA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.46.4", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.4.tgz", + "integrity": "sha512-QkWfNbeRuzFnv2d0aPlrzcA3Ebq2mE8kX/5Pl7VdRShbPBjSnom7dbT8E3Jmhxo2RL784hyqGvR5KHavCJQciw==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "engines": { - "node": ">=6.0.0" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "license": "MIT" + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.4.tgz", + "integrity": "sha512-+ToyOMYnSfV8D+ckxO6NthPln/PDNp1P6INcNypfZ7muLmEvPKXqduUiD8DlJpMMT8LxHcE5W0dK9kXfJke9Zw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.4.tgz", + "integrity": "sha512-cGT6ey/W+sje6zywbLiqmkfkO210FgRz7tepWAzzEVgQU8Hn91JJmQWNqs55IuglG8sJdzk7XfNgmGRtcYlo1w==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/@mongodb-js/saslprep": { - "version": "1.3.1", + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.4.tgz", + "integrity": "sha512-9fhTJyOb275w5RofPSl8lpr4jFowd+H4oQKJ9XTYzD1JWgxdZKE8bA6d4npuiMemkecQOcigX01FNZNCYnQBdA==", + "cpu": [ + "arm" + ], + "dev": true, "license": "MIT", - "dependencies": { - "sparse-bitfield": "^3.0.3" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@next/env": { - "version": "15.5.0", - "license": "MIT" + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.4.tgz", + "integrity": "sha512-+6kCIM5Zjvz2HwPl/udgVs07tPMIp1VU2Y0c72ezjOvSvEfAIWsUgpcSDvnC7g9NrjYR6X9bZT92mZZ90TfvXw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@next/swc-darwin-arm64": { - "version": "15.5.0", + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.4.tgz", + "integrity": "sha512-SWuXdnsayCZL4lXoo6jn0yyAj7TTjWE4NwDVt9s7cmu6poMhtiras5c8h6Ih6Y0Zk6Z+8t/mLumvpdSPTWub2Q==", "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } + "linux" + ] }, - "node_modules/@next/swc-darwin-x64": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.0.tgz", - "integrity": "sha512-s2Nk6ec+pmYmAb/utawuURy7uvyYKDk+TRE5aqLRsdnj3AhwC9IKUBmhfnLmY/+P+DnwqpeXEFIKe9tlG0p6CA==", + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.4.tgz", + "integrity": "sha512-vDknMDqtMhrrroa5kyX6tuC0aRZZlQ+ipDfbXd2YGz5HeV2t8HOl/FDAd2ynhs7Ki5VooWiiZcCtxiZ4IjqZwQ==", "cpu": [ - "x64" + "arm64" ], + "dev": true, + "license": "MIT", "optional": true, "os": [ - "darwin" + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.4.tgz", + "integrity": "sha512-mCBkjRZWhvjtl/x+Bd4fQkWZT8canStKDxGrHlBiTnZmJnWygGcvBylzLVCZXka4dco5ymkWhZlLwKCGFF4ivw==", + "cpu": [ + "loong64" ], - "engines": { - "node": ">= 10" - } + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.0.tgz", - "integrity": "sha512-mGlPJMZReU4yP5fSHjOxiTYvZmwPSWn/eF/dcg21pwfmiUCKS1amFvf1F1RkLHPIMPfocxLViNWFvkvDB14Isg==", + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.4.tgz", + "integrity": "sha512-YMdz2phOTFF+Z66dQfGf0gmeDSi5DJzY5bpZyeg9CPBkV9QDzJ1yFRlmi/j7WWRf3hYIWrOaJj5jsfwgc8GTHQ==", "cpu": [ - "arm64" + "ppc64" ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.4.tgz", + "integrity": "sha512-r0WKLSfFAK8ucG024v2yiLSJMedoWvk8yWqfNICX28NHDGeu3F/wBf8KG6mclghx4FsLePxJr/9N8rIj1PtCnw==", + "cpu": [ + "riscv64" ], - "engines": { - "node": ">= 10" - } + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.0.tgz", - "integrity": "sha512-biWqIOE17OW/6S34t1X8K/3vb1+svp5ji5QQT/IKR+VfM3B7GvlCwmz5XtlEan2ukOUf9tj2vJJBffaGH4fGRw==", + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.4.tgz", + "integrity": "sha512-IaizpPP2UQU3MNyPH1u0Xxbm73D+4OupL0bjo4Hm0496e2wg3zuvoAIhubkD1NGy9fXILEExPQy87mweujEatA==", "cpu": [ - "arm64" + "riscv64" ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.4.tgz", + "integrity": "sha512-aCM29orANR0a8wk896p6UEgIfupReupnmISz6SUwMIwTGaTI8MuKdE0OD2LvEg8ondDyZdMvnaN3bW4nFbATPA==", + "cpu": [ + "s390x" ], - "engines": { - "node": ">= 10" - } + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.0.tgz", - "integrity": "sha512-zPisT+obYypM/l6EZ0yRkK3LEuoZqHaSoYKj+5jiD9ESHwdr6QhnabnNxYkdy34uCigNlWIaCbjFmQ8FY5AlxA==", + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.4.tgz", + "integrity": "sha512-0Xj1vZE3cbr/wda8d/m+UeuSL+TDpuozzdD4QaSzu/xSOMK0Su5RhIkF7KVHFQsobemUNHPLEcYllL7ZTCP/Cg==", "cpu": [ "x64" ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" - ], - "engines": { - "node": ">= 10" - } + ] }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.0.tgz", - "integrity": "sha512-+t3+7GoU9IYmk+N+FHKBNFdahaReoAktdOpXHFIPOU1ixxtdge26NgQEEkJkCw2dHT9UwwK5zw4mAsURw4E8jA==", + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.4.tgz", + "integrity": "sha512-kM/orjpolfA5yxsx84kI6bnK47AAZuWxglGKcNmokw2yy9i5eHY5UAjcX45jemTJnfHAWo3/hOoRqEeeTdL5hw==", "cpu": [ "x64" ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" - ], - "engines": { - "node": ">= 10" - } + ] }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.0.tgz", - "integrity": "sha512-d8MrXKh0A+c9DLiy1BUFwtg3Hu90Lucj3k6iKTUdPOv42Ve2UiIG8HYi3UAb8kFVluXxEfdpCoPPCSODk5fDcw==", + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.4.tgz", + "integrity": "sha512-cNLH4psMEsWKILW0isbpQA2OvjXLbKvnkcJFmqAptPQbtLrobiapBJVj6RoIvg6UXVp5w0wnIfd/Q56cNpF+Ew==", "cpu": [ "arm64" ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" - ], - "engines": { - "node": ">= 10" - } + ] }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.0.tgz", - "integrity": "sha512-Fe1tGHxOWEyQjmygWkkXSwhFcTJuimrNu52JEuwItrKJVV4iRjbWp9I7zZjwqtiNnQmxoEvoisn8wueFLrNpvQ==", + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.4.tgz", + "integrity": "sha512-OiEa5lRhiANpv4SfwYVgQ3opYWi/QmPDC5ve21m8G9pf6ZO+aX1g2EEF1/IFaM1xPSP7mK0msTRXlPs6mIagkg==", "cpu": [ - "x64" + "ia32" ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" - ], - "engines": { - "node": ">= 10" - } + ] }, - "node_modules/@rollup/rollup-darwin-arm64": { + "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.46.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.4.tgz", + "integrity": "sha512-IKL9mewGZ5UuuX4NQlwOmxPyqielvkAPUS2s1cl6yWjjQvyN3h5JTdVFGD5Jr5xMjRC8setOfGQDVgX8V+dkjg==", "cpu": [ - "arm64" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "darwin" + "win32" ] }, "node_modules/@sinclair/typebox": { @@ -3701,6 +4392,20 @@ "turbo-windows-arm64": "2.5.6" } }, + "node_modules/turbo-darwin-64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.5.6.tgz", + "integrity": "sha512-3C1xEdo4aFwMJAPvtlPqz1Sw/+cddWIOmsalHFMrsqqydcptwBfu26WW2cDm3u93bUzMbBJ8k3zNKFqxJ9ei2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, "node_modules/turbo-darwin-arm64": { "version": "2.5.6", "cpu": [ @@ -3713,6 +4418,62 @@ "darwin" ] }, + "node_modules/turbo-linux-64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.5.6.tgz", + "integrity": "sha512-GOcUTT0xiT/pSnHL4YD6Yr3HreUhU8pUcGqcI2ksIF9b2/r/kRHwGFcsHgpG3+vtZF/kwsP0MV8FTlTObxsYIA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-linux-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.5.6.tgz", + "integrity": "sha512-10Tm15bruJEA3m0V7iZcnQBpObGBcOgUcO+sY7/2vk1bweW34LMhkWi8svjV9iDF68+KJDThnYDlYE/bc7/zzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-windows-64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.5.6.tgz", + "integrity": "sha512-FyRsVpgaj76It0ludwZsNN40ytHN+17E4PFJyeliBEbxrGTc5BexlXVpufB7XlAaoaZVxbS6KT8RofLfDRyEPg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/turbo-windows-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.5.6.tgz", + "integrity": "sha512-j/tWu8cMeQ7HPpKri6jvKtyXg9K1gRyhdK4tKrrchH8GNHscPX/F71zax58yYtLRWTiK04zNzPcUJuoS0+v/+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/typescript": { "version": "5.9.2", "dev": true, From dd215784a25a294e113e74d1e1ee331af3db939f Mon Sep 17 00:00:00 2001 From: Manolo Dorado Date: Wed, 17 Dec 2025 18:08:05 +0100 Subject: [PATCH 2/5] feat: refactor province handling and update layout to use new constants --- .../embalse-provincia/[provincia]/page.tsx | 1 + .../app/embalse-provincia/array-provincias.ts | 52 ------------------ front/src/app/embalse-provincia/page.tsx | 10 ++-- front/src/common/models/index.ts | 1 + front/src/common/models/lookup.model.ts | 4 ++ front/src/core/constants/index.ts | 1 + .../core/constants/provincias.constants.ts | 54 +++++++++++++++++++ front/tsconfig.json | 6 ++- 8 files changed, 71 insertions(+), 58 deletions(-) delete mode 100644 front/src/app/embalse-provincia/array-provincias.ts create mode 100644 front/src/common/models/index.ts create mode 100644 front/src/common/models/lookup.model.ts create mode 100644 front/src/core/constants/index.ts create mode 100644 front/src/core/constants/provincias.constants.ts diff --git a/front/src/app/embalse-provincia/[provincia]/page.tsx b/front/src/app/embalse-provincia/[provincia]/page.tsx index 0e144b9..1ade12d 100644 --- a/front/src/app/embalse-provincia/[provincia]/page.tsx +++ b/front/src/app/embalse-provincia/[provincia]/page.tsx @@ -6,6 +6,7 @@ interface Props { export default async function EmbalseProvinciaListadoPage({ params }: Props) { const { provincia } = await params; + // TODO: usar la constante PROVINCIAS y si coincide el id pintar el name return (

Embalses de {provincia}

diff --git a/front/src/app/embalse-provincia/array-provincias.ts b/front/src/app/embalse-provincia/array-provincias.ts deleted file mode 100644 index 5c0e25a..0000000 --- a/front/src/app/embalse-provincia/array-provincias.ts +++ /dev/null @@ -1,52 +0,0 @@ -export const provincias = [ - "Álava", - "Albacete", - "Alicante", - "Almería", - "Asturias", - "Ávila", - "Badajoz", - "Baleares", - "Barcelona", - "Burgos", - "Cáceres", - "Cádiz", - "Cantabria", - "Castellón", - "Ciudad Real", - "Córdoba", - "La Coruña", - "Cuenca", - "Gerona", - "Granada", - "Guadalajara", - "Guipúzcoa", - "Huelva", - "Huesca", - "Jaén", - "La Rioja", - "Las Palmas", - "León", - "Lérida", - "Lugo", - "Madrid", - "Málaga", - "Murcia", - "Navarra", - "Orense", - "Palencia", - "Pontevedra", - "Salamanca", - "Santa Cruz de Tenerife", - "Segovia", - "Sevilla", - "Soria", - "Tarragona", - "Teruel", - "Toledo", - "Valencia", - "Valladolid", - "Vizcaya", - "Zamora", - "Zaragoza", -]; diff --git a/front/src/app/embalse-provincia/page.tsx b/front/src/app/embalse-provincia/page.tsx index 348e1a0..b33e681 100644 --- a/front/src/app/embalse-provincia/page.tsx +++ b/front/src/app/embalse-provincia/page.tsx @@ -1,18 +1,18 @@ import Link from "next/link"; -import { provincias } from "./array-provincias"; +import { PROVINCIAS } from "@/core/constants"; export default function EmbalsesProvinciaPage() { return (

Embalses por provincias

- {provincias.map((provincia) => ( + {PROVINCIAS.map(({ id, name }) => ( - {provincia} + {name} ))}
diff --git a/front/src/common/models/index.ts b/front/src/common/models/index.ts new file mode 100644 index 0000000..a13e258 --- /dev/null +++ b/front/src/common/models/index.ts @@ -0,0 +1 @@ +export * from "./lookup.model"; diff --git a/front/src/common/models/lookup.model.ts b/front/src/common/models/lookup.model.ts new file mode 100644 index 0000000..cd43ce3 --- /dev/null +++ b/front/src/common/models/lookup.model.ts @@ -0,0 +1,4 @@ +export interface Lookup { + id: string; + name: string; +} diff --git a/front/src/core/constants/index.ts b/front/src/core/constants/index.ts new file mode 100644 index 0000000..d333a56 --- /dev/null +++ b/front/src/core/constants/index.ts @@ -0,0 +1 @@ +export * from "./provincias.constants"; diff --git a/front/src/core/constants/provincias.constants.ts b/front/src/core/constants/provincias.constants.ts new file mode 100644 index 0000000..898929a --- /dev/null +++ b/front/src/core/constants/provincias.constants.ts @@ -0,0 +1,54 @@ +import { Lookup } from "@/common/models"; + +export const PROVINCIAS: Lookup[] = [ + { id: "alava", name: "Álava" }, + { id: "albacete", name: "Albacete" }, + { id: "alicante", name: "Alicante" }, + { id: "almeria", name: "Almería" }, + { id: "asturias", name: "Asturias" }, + { id: "avila", name: "Ávila" }, + { id: "badajoz", name: "Badajoz" }, + { id: "baleares", name: "Baleares" }, + { id: "barcelona", name: "Barcelona" }, + { id: "burgos", name: "Burgos" }, + { id: "caceres", name: "Cáceres" }, + { id: "cadiz", name: "Cádiz" }, + { id: "cantabria", name: "Cantabria" }, + { id: "castellon", name: "Castellón" }, + { id: "ciudad-real", name: "Ciudad Real" }, + { id: "cordoba", name: "Córdoba" }, + { id: "la-coruna", name: "La Coruña" }, + { id: "cuenca", name: "Cuenca" }, + { id: "gerona", name: "Gerona" }, + { id: "granada", name: "Granada" }, + { id: "guadalajara", name: "Guadalajara" }, + { id: "guipuzcoa", name: "Guipúzcoa" }, + { id: "huelva", name: "Huelva" }, + { id: "huesca", name: "Huesca" }, + { id: "jaen", name: "Jaén" }, + { id: "la-rioja", name: "La Rioja" }, + { id: "las-palmas", name: "Las Palmas" }, + { id: "leon", name: "León" }, + { id: "lerida", name: "Lérida" }, + { id: "lugo", name: "Lugo" }, + { id: "madrid", name: "Madrid" }, + { id: "malaga", name: "Málaga" }, + { id: "murcia", name: "Murcia" }, + { id: "navarra", name: "Navarra" }, + { id: "orense", name: "Orense" }, + { id: "palencia", name: "Palencia" }, + { id: "pontevedra", name: "Pontevedra" }, + { id: "salamanca", name: "Salamanca" }, + { id: "santa-cruz-de-tenerife", name: "Santa Cruz de Tenerife" }, + { id: "segovia", name: "Segovia" }, + { id: "sevilla", name: "Sevilla" }, + { id: "soria", name: "Soria" }, + { id: "tarragona", name: "Tarragona" }, + { id: "teruel", name: "Teruel" }, + { id: "toledo", name: "Toledo" }, + { id: "valencia", name: "Valencia" }, + { id: "valladolid", name: "Valladolid" }, + { id: "vizcaya", name: "Vizcaya" }, + { id: "zamora", name: "Zamora" }, + { id: "zaragoza", name: "Zaragoza" }, +]; diff --git a/front/tsconfig.json b/front/tsconfig.json index 2a83fc1..4ed81f2 100644 --- a/front/tsconfig.json +++ b/front/tsconfig.json @@ -21,7 +21,11 @@ { "name": "next" } - ] + ], + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] + } }, "include": [ "next-env.d.ts", From 2533b22412de5e2016b5c7fbba97fd225637983a Mon Sep 17 00:00:00 2001 From: Monika Stefanova Date: Wed, 17 Dec 2025 19:22:51 +0100 Subject: [PATCH 3/5] feat: find province name matching URL id parameter from array --- front/src/app/embalse-provincia/[provincia]/page.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/front/src/app/embalse-provincia/[provincia]/page.tsx b/front/src/app/embalse-provincia/[provincia]/page.tsx index 1ade12d..4c45bed 100644 --- a/front/src/app/embalse-provincia/[provincia]/page.tsx +++ b/front/src/app/embalse-provincia/[provincia]/page.tsx @@ -1,4 +1,5 @@ import Link from "next/link"; +import { PROVINCIAS } from "@/core/constants"; interface Props { params: Promise<{ provincia: string }>; @@ -6,10 +7,14 @@ interface Props { export default async function EmbalseProvinciaListadoPage({ params }: Props) { const { provincia } = await params; - // TODO: usar la constante PROVINCIAS y si coincide el id pintar el name + + const nombreProvincia = PROVINCIAS.find( + (province) => province.id === provincia, + )?.name; + return (
-

Embalses de {provincia}

+

Embalses de {nombreProvincia}

Embalse de Casasola From c78f5e01b49a8cdb9cc1fb1f1f9682558510f2e0 Mon Sep 17 00:00:00 2001 From: Manolo Dorado Date: Thu, 18 Dec 2025 12:05:11 +0100 Subject: [PATCH 4/5] fix: correct class order in layout for EmbalsesProvinciaPage --- front/src/app/embalse-provincia/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/app/embalse-provincia/page.tsx b/front/src/app/embalse-provincia/page.tsx index b33e681..1097faa 100644 --- a/front/src/app/embalse-provincia/page.tsx +++ b/front/src/app/embalse-provincia/page.tsx @@ -3,7 +3,7 @@ import { PROVINCIAS } from "@/core/constants"; export default function EmbalsesProvinciaPage() { return ( -
+

Embalses por provincias

{PROVINCIAS.map(({ id, name }) => ( From c334cb8f0c387684394cd121b4a96344508509ab Mon Sep 17 00:00:00 2001 From: Manolo Dorado Date: Thu, 18 Dec 2025 12:09:37 +0100 Subject: [PATCH 5/5] fix: correct spelling of province names in constants --- front/src/core/constants/provincias.constants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/src/core/constants/provincias.constants.ts b/front/src/core/constants/provincias.constants.ts index 898929a..3dc44c5 100644 --- a/front/src/core/constants/provincias.constants.ts +++ b/front/src/core/constants/provincias.constants.ts @@ -19,7 +19,7 @@ export const PROVINCIAS: Lookup[] = [ { id: "cordoba", name: "Córdoba" }, { id: "la-coruna", name: "La Coruña" }, { id: "cuenca", name: "Cuenca" }, - { id: "gerona", name: "Gerona" }, + { id: "girona", name: "Girona" }, { id: "granada", name: "Granada" }, { id: "guadalajara", name: "Guadalajara" }, { id: "guipuzcoa", name: "Guipúzcoa" }, @@ -29,13 +29,13 @@ export const PROVINCIAS: Lookup[] = [ { id: "la-rioja", name: "La Rioja" }, { id: "las-palmas", name: "Las Palmas" }, { id: "leon", name: "León" }, - { id: "lerida", name: "Lérida" }, + { id: "lleida", name: "Lleida" }, { id: "lugo", name: "Lugo" }, { id: "madrid", name: "Madrid" }, { id: "malaga", name: "Málaga" }, { id: "murcia", name: "Murcia" }, { id: "navarra", name: "Navarra" }, - { id: "orense", name: "Orense" }, + { id: "ourense", name: "Ourense" }, { id: "palencia", name: "Palencia" }, { id: "pontevedra", name: "Pontevedra" }, { id: "salamanca", name: "Salamanca" },