From 76e53d6f280960983d6c62bae2fb222be24f2ad8 Mon Sep 17 00:00:00 2001 From: fede Date: Thu, 31 Oct 2024 19:22:27 -0300 Subject: [PATCH] empiezo migracion svelte 5 Signed-off-by: fede --- Aspnet/Controllers/AccionesController.cs | 20 ++ Aspnet/Controllers/PropiedadesController.cs | 8 + Front/.svelte-kit/ambient.d.ts | 257 ++++++++++++++++++ Front/.svelte-kit/generated/client/app.js | 20 ++ .../.svelte-kit/generated/client/matchers.js | 1 + Front/.svelte-kit/generated/client/nodes/0.js | 1 + Front/.svelte-kit/generated/client/nodes/1.js | 1 + Front/.svelte-kit/non-ambient.d.ts | 25 ++ Front/.svelte-kit/tsconfig.json | 49 ++++ Front/bun.lockb | Bin 39730 -> 40387 bytes Front/package.json | 10 +- Front/src/lib/NavBarAutocompletable.svelte | 28 +- Front/tsconfig.json | 2 +- Modelo/RepositorioPermisos.cs | 19 ++ 14 files changed, 434 insertions(+), 7 deletions(-) create mode 100644 Aspnet/Controllers/AccionesController.cs create mode 100644 Aspnet/Controllers/PropiedadesController.cs create mode 100644 Front/.svelte-kit/ambient.d.ts create mode 100644 Front/.svelte-kit/generated/client/app.js create mode 100644 Front/.svelte-kit/generated/client/matchers.js create mode 100644 Front/.svelte-kit/generated/client/nodes/0.js create mode 100644 Front/.svelte-kit/generated/client/nodes/1.js create mode 100644 Front/.svelte-kit/non-ambient.d.ts create mode 100644 Front/.svelte-kit/tsconfig.json create mode 100644 Modelo/RepositorioPermisos.cs diff --git a/Aspnet/Controllers/AccionesController.cs b/Aspnet/Controllers/AccionesController.cs new file mode 100644 index 0000000..e69516d --- /dev/null +++ b/Aspnet/Controllers/AccionesController.cs @@ -0,0 +1,20 @@ +using Microsoft.AspNetCore.Mvc; +using Modelo; + +namespace AlquilaFacil.Controllers; + +[ApiController] +public class AccionesController: ControllerBase { + + [HttpPost("api/acciones")] + public IActionResult ListarAccionesPorUsuario([FromBody] string email) { + Request.Cookies.TryGetValue("token", out var token); + if (token == null) return Unauthorized(new { esValido = false}); + + bool esValido = RepositorioUsuarios.Singleton.CheckToken(email, token); + if (!esValido) return Unauthorized(); + + var Permisos = RepositorioPermisos.Singleton.ListarPermisos(email); + return Ok(Permisos); + } +} \ No newline at end of file diff --git a/Aspnet/Controllers/PropiedadesController.cs b/Aspnet/Controllers/PropiedadesController.cs new file mode 100644 index 0000000..b81634e --- /dev/null +++ b/Aspnet/Controllers/PropiedadesController.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.Mvc; + +namespace AlquilaFacil.Controllers; + +[ApiController] +public class PropiedadesController: ControllerBase { + +} \ No newline at end of file diff --git a/Front/.svelte-kit/ambient.d.ts b/Front/.svelte-kit/ambient.d.ts new file mode 100644 index 0000000..1fb49d9 --- /dev/null +++ b/Front/.svelte-kit/ambient.d.ts @@ -0,0 +1,257 @@ + +// this file is generated — do not edit it + + +/// + +/** + * Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured). + * + * _Unlike_ [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination. + * + * ```ts + * import { API_KEY } from '$env/static/private'; + * ``` + * + * Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed: + * + * ``` + * MY_FEATURE_FLAG="" + * ``` + * + * You can override `.env` values from the command line like so: + * + * ```bash + * MY_FEATURE_FLAG="enabled" npm run dev + * ``` + */ +declare module '$env/static/private' { + export const SHELL: string; + export const LSCOLORS: string; + export const SESSION_MANAGER: string; + export const WINDOWID: string; + export const COLORTERM: string; + export const XDG_CONFIG_DIRS: string; + export const LESS: string; + export const XDG_SESSION_PATH: string; + export const XDG_MENU_PREFIX: string; + export const ICEAUTHORITY: string; + export const LANGUAGE: string; + export const NODE: string; + export const LC_ADDRESS: string; + export const LC_NAME: string; + export const GRADLE_HOME: string; + export const SHELL_SESSION_ID: string; + export const MEMORY_PRESSURE_WRITE: string; + export const npm_config_local_prefix: string; + export const DESKTOP_SESSION: string; + export const LC_MONETARY: string; + export const GTK_RC_FILES: string; + export const EDITOR: string; + export const XDG_SEAT: string; + export const PWD: string; + export const XDG_SESSION_DESKTOP: string; + export const LOGNAME: string; + export const XDG_SESSION_TYPE: string; + export const BUN_WHICH_IGNORE_CWD: string; + export const SYSTEMD_EXEC_PID: string; + export const _: string; + export const XAUTHORITY: string; + export const MOTD_SHOWN: string; + export const GTK2_RC_FILES: string; + export const HOME: string; + export const LC_PAPER: string; + export const LANG: string; + export const LS_COLORS: string; + export const XDG_CURRENT_DESKTOP: string; + export const KONSOLE_DBUS_SERVICE: string; + export const npm_package_version: string; + export const MEMORY_PRESSURE_WATCH: string; + export const WAYLAND_DISPLAY: string; + export const KONSOLE_DBUS_SESSION: string; + export const PROFILEHOME: string; + export const XDG_SEAT_PATH: string; + export const INVOCATION_ID: string; + export const KONSOLE_VERSION: string; + export const MANAGERPID: string; + export const INIT_CWD: string; + export const KDE_SESSION_UID: string; + export const XKB_DEFAULT_LAYOUT: string; + export const XDG_SESSION_CLASS: string; + export const TERM: string; + export const LC_IDENTIFICATION: string; + export const npm_package_name: string; + export const ZSH: string; + export const USER: string; + export const COLORFGBG: string; + export const QT_WAYLAND_RECONNECT: string; + export const KDE_SESSION_VERSION: string; + export const PAM_KWALLET5_LOGIN: string; + export const DISPLAY: string; + export const SHLVL: string; + export const PAGER: string; + export const LC_TELEPHONE: string; + export const LC_MEASUREMENT: string; + export const XDG_VTNR: string; + export const XDG_SESSION_ID: string; + export const npm_config_user_agent: string; + export const npm_execpath: string; + export const XDG_RUNTIME_DIR: string; + export const DEBUGINFOD_URLS: string; + export const npm_package_json: string; + export const LC_TIME: string; + export const BUN_INSTALL: string; + export const QT_AUTO_SCREEN_SCALE_FACTOR: string; + export const JOURNAL_STREAM: string; + export const XDG_DATA_DIRS: string; + export const KDE_FULL_SESSION: string; + export const BROWSER: string; + export const PATH: string; + export const DBUS_SESSION_BUS_ADDRESS: string; + export const KDE_APPLICATIONS_AS_SCOPE: string; + export const MAIL: string; + export const npm_node_execpath: string; + export const LC_NUMERIC: string; + export const OLDPWD: string; + export const KONSOLE_DBUS_WINDOW: string; +} + +/** + * Similar to [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. + * + * Values are replaced statically at build time. + * + * ```ts + * import { PUBLIC_BASE_URL } from '$env/static/public'; + * ``` + */ +declare module '$env/static/public' { + +} + +/** + * This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured). + * + * This module cannot be imported into client-side code. + * + * Dynamic environment variables cannot be used during prerendering. + * + * ```ts + * import { env } from '$env/dynamic/private'; + * console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE); + * ``` + * + * > In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter. + */ +declare module '$env/dynamic/private' { + export const env: { + SHELL: string; + LSCOLORS: string; + SESSION_MANAGER: string; + WINDOWID: string; + COLORTERM: string; + XDG_CONFIG_DIRS: string; + LESS: string; + XDG_SESSION_PATH: string; + XDG_MENU_PREFIX: string; + ICEAUTHORITY: string; + LANGUAGE: string; + NODE: string; + LC_ADDRESS: string; + LC_NAME: string; + GRADLE_HOME: string; + SHELL_SESSION_ID: string; + MEMORY_PRESSURE_WRITE: string; + npm_config_local_prefix: string; + DESKTOP_SESSION: string; + LC_MONETARY: string; + GTK_RC_FILES: string; + EDITOR: string; + XDG_SEAT: string; + PWD: string; + XDG_SESSION_DESKTOP: string; + LOGNAME: string; + XDG_SESSION_TYPE: string; + BUN_WHICH_IGNORE_CWD: string; + SYSTEMD_EXEC_PID: string; + _: string; + XAUTHORITY: string; + MOTD_SHOWN: string; + GTK2_RC_FILES: string; + HOME: string; + LC_PAPER: string; + LANG: string; + LS_COLORS: string; + XDG_CURRENT_DESKTOP: string; + KONSOLE_DBUS_SERVICE: string; + npm_package_version: string; + MEMORY_PRESSURE_WATCH: string; + WAYLAND_DISPLAY: string; + KONSOLE_DBUS_SESSION: string; + PROFILEHOME: string; + XDG_SEAT_PATH: string; + INVOCATION_ID: string; + KONSOLE_VERSION: string; + MANAGERPID: string; + INIT_CWD: string; + KDE_SESSION_UID: string; + XKB_DEFAULT_LAYOUT: string; + XDG_SESSION_CLASS: string; + TERM: string; + LC_IDENTIFICATION: string; + npm_package_name: string; + ZSH: string; + USER: string; + COLORFGBG: string; + QT_WAYLAND_RECONNECT: string; + KDE_SESSION_VERSION: string; + PAM_KWALLET5_LOGIN: string; + DISPLAY: string; + SHLVL: string; + PAGER: string; + LC_TELEPHONE: string; + LC_MEASUREMENT: string; + XDG_VTNR: string; + XDG_SESSION_ID: string; + npm_config_user_agent: string; + npm_execpath: string; + XDG_RUNTIME_DIR: string; + DEBUGINFOD_URLS: string; + npm_package_json: string; + LC_TIME: string; + BUN_INSTALL: string; + QT_AUTO_SCREEN_SCALE_FACTOR: string; + JOURNAL_STREAM: string; + XDG_DATA_DIRS: string; + KDE_FULL_SESSION: string; + BROWSER: string; + PATH: string; + DBUS_SESSION_BUS_ADDRESS: string; + KDE_APPLICATIONS_AS_SCOPE: string; + MAIL: string; + npm_node_execpath: string; + LC_NUMERIC: string; + OLDPWD: string; + KONSOLE_DBUS_WINDOW: string; + [key: `PUBLIC_${string}`]: undefined; + [key: `${string}`]: string | undefined; + } +} + +/** + * Similar to [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. + * + * Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead. + * + * Dynamic environment variables cannot be used during prerendering. + * + * ```ts + * import { env } from '$env/dynamic/public'; + * console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE); + * ``` + */ +declare module '$env/dynamic/public' { + export const env: { + [key: `PUBLIC_${string}`]: string | undefined; + } +} diff --git a/Front/.svelte-kit/generated/client/app.js b/Front/.svelte-kit/generated/client/app.js new file mode 100644 index 0000000..3ef9588 --- /dev/null +++ b/Front/.svelte-kit/generated/client/app.js @@ -0,0 +1,20 @@ +export { matchers } from './matchers.js'; + +export const nodes = [ + () => import('./nodes/0'), + () => import('./nodes/1') +]; + +export const server_loads = []; + +export const dictionary = { + + }; + +export const hooks = { + handleError: (({ error }) => { console.error(error) }), + + reroute: (() => {}) +}; + +export { default as root } from '../root.svelte'; \ No newline at end of file diff --git a/Front/.svelte-kit/generated/client/matchers.js b/Front/.svelte-kit/generated/client/matchers.js new file mode 100644 index 0000000..f6bd30a --- /dev/null +++ b/Front/.svelte-kit/generated/client/matchers.js @@ -0,0 +1 @@ +export const matchers = {}; \ No newline at end of file diff --git a/Front/.svelte-kit/generated/client/nodes/0.js b/Front/.svelte-kit/generated/client/nodes/0.js new file mode 100644 index 0000000..34d98d8 --- /dev/null +++ b/Front/.svelte-kit/generated/client/nodes/0.js @@ -0,0 +1 @@ +export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-4/layout.svelte"; \ No newline at end of file diff --git a/Front/.svelte-kit/generated/client/nodes/1.js b/Front/.svelte-kit/generated/client/nodes/1.js new file mode 100644 index 0000000..9cae4f0 --- /dev/null +++ b/Front/.svelte-kit/generated/client/nodes/1.js @@ -0,0 +1 @@ +export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-4/error.svelte"; \ No newline at end of file diff --git a/Front/.svelte-kit/non-ambient.d.ts b/Front/.svelte-kit/non-ambient.d.ts new file mode 100644 index 0000000..46bd7fb --- /dev/null +++ b/Front/.svelte-kit/non-ambient.d.ts @@ -0,0 +1,25 @@ + +// this file is generated — do not edit it + + +declare module "svelte/elements" { + export interface HTMLAttributes { + 'data-sveltekit-keepfocus'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-noscroll'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-preload-code'?: + | true + | '' + | 'eager' + | 'viewport' + | 'hover' + | 'tap' + | 'off' + | undefined + | null; + 'data-sveltekit-preload-data'?: true | '' | 'hover' | 'tap' | 'off' | undefined | null; + 'data-sveltekit-reload'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-replacestate'?: true | '' | 'off' | undefined | null; + } +} + +export {}; diff --git a/Front/.svelte-kit/tsconfig.json b/Front/.svelte-kit/tsconfig.json new file mode 100644 index 0000000..a2a7665 --- /dev/null +++ b/Front/.svelte-kit/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + "paths": { + "$lib": [ + "../src/lib" + ], + "$lib/*": [ + "../src/lib/*" + ] + }, + "rootDirs": [ + "..", + "./types" + ], + "verbatimModuleSyntax": true, + "isolatedModules": true, + "lib": [ + "esnext", + "DOM", + "DOM.Iterable" + ], + "moduleResolution": "bundler", + "module": "esnext", + "noEmit": true, + "target": "esnext" + }, + "include": [ + "ambient.d.ts", + "non-ambient.d.ts", + "./types/**/$types.d.ts", + "../vite.config.js", + "../vite.config.ts", + "../src/**/*.js", + "../src/**/*.ts", + "../src/**/*.svelte", + "../tests/**/*.js", + "../tests/**/*.ts", + "../tests/**/*.svelte" + ], + "exclude": [ + "../node_modules/**", + "../src/service-worker.js", + "../src/service-worker/**/*.js", + "../src/service-worker.ts", + "../src/service-worker/**/*.ts", + "../src/service-worker.d.ts", + "../src/service-worker/**/*.d.ts" + ] +} \ No newline at end of file diff --git a/Front/bun.lockb b/Front/bun.lockb index f4cbd759d6c29fcb0072a4a2934d40ba7d72e79a..254fc77971941f664334cb276c0d4553732cd188 100755 GIT binary patch delta 3532 zcmdnAjp^`irU`nQF*A$!e(#=X$NxmKqijk%FVza%D~W|$j!hY z!obkL3#ET@LHJLh^hGGW7fP>$(o>;y6Bh%6FatwFK7_7sh=DK~JfXBX7XyP314Dx< zlop24j8OVLCq%v|KPRWOfPukEgn>bpfuTW8gn>bZfuVsB%6}ouz#z%M&~QqafkBRe zp<$UY1A__!LqnS|1A_tsLqi5wJeZ-uRhWT6nSr4}S(t%AiGiVkMVNs>o`Ip^sSt!d zE(9@P1(e?-1hJ@4h=D^YMUGKq6el44-sVqj?KocxeUo$=3P zPG)(=ZJRZj_cL*5uw)9jbN;GW{DPHz@)8b>$pY*gf_@wf42BF04Xg|d3@i)`3|x~h zvZ;e)7`IK1MG%^ zgZvB(Zea7+1z;>+IBPPTbyI+W!3C^NRuINYgtL~ySubHMMw`izBKEA|A`A@ClVe4! zSvQF=Fhqh`+@dhCG*JeIV6fOuQ3i%sFiT8~fguyjsuyEmNCdMUh{0rS#TgjV!D36q z85mN*EKUgqhIlY51I{`w0n?!(36pJ>gt_33Bm+Y@SckC`14G#4SPpBZLsFBac!JQky7@IhbGUIvgc%zWneG^CArCo9Oj%hvXI2UF!>>`#pFn7d&UEkXG+_1{*Yy0 zFag_^C~eN9BR5$}#*Q&_a-@ts;&dhk1_qAF7umGIDfGzXn{xI{ zEQ*t*KT ztpd3}zpL40t}ETX%Ej#0OomepE-nJcgF9|Afs(>M{(p?%k{cS13=AySq;J`s$g}k> ztmIYP82H`jc}eQZbNZ~ob03%ru^lj;^e}Ux)`_oelCFFQw=UKX+H$zUt?AR8-2P>| z`n7q*;oGs|72c$cUF+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Ld9L>kSx{gJ5zfij5$43 zH%{S+o|p0S>TbpA?=Gr`&rIIyE-_ix!<#X2a-~Q3p7W;F>A7-k1*33&dqiH`xqyGU=x|Fz|Jz6$B%vw8e6uT-M3JzyQj9Z4BT#k6}g{#N-zllh>uHO`ed>A_y`T zlnE0U7#KhS6gPQk`eNN!1_p*01_p*`1_p*G1_p*m1_lN{1_lN`1_p)@1_p+31_p*O z1_p*81_lQI$)y?Z>ph_=d>I%Rd>9xQyrHT+7{K*51IP}L8c7BQFx#Dhfx!#P{{R2~ z|3C%?h5!ZzhES*t!3+!x5ey6rtPBhcNem1OiI8d;Y%|C#P)PvNm(0MxAd$%c%GL}F z3Kg5BvJ@FPK&1`Hr<_+iGhm!dS-vX|>FmELb7QxMK3e zLSsgi$wv!~O<~QEd-wLwU2U}2l7-Pg&&W{ElmT4ngBmiKJ8f2&u;o5O$Oui=Es~Um zHE<3-ow!0+-2FR3-fVJWktCzX4`g|(+R1nsnU zFitsxkcYLnPOt||cYBe02qCj#^4}s!X;=&G5W_onwUA<>4T~iipG@{HmXwCI z?~=s+aPrHGd_$<>nOt8iX$or(p7_=vU$Z21GD05KVw@*!u

6FO_7poXlC4&e$=zuuPJ1;^gi!W5(H&_m}xjcBz=6 zd`y~wK@i${1f^6BmP`S6&R-QGjIJ^a3{ngX4W}pnt}qsEl?5lfhMI{7qu389%w=LM zpX^w&4=E=TQ##{vzAQKoEHdIXRsw$J>RA6A>VPI%zu`oTuSi$%20aSX{ ptj$u@f7lrfCyO^PVzk)2yE#c{a^F;$&6(3$SQ*VXznguP5dhVg+aLe{ diff --git a/Front/package.json b/Front/package.json index f7518bb..f2b03d6 100644 --- a/Front/package.json +++ b/Front/package.json @@ -13,13 +13,13 @@ "@sveltejs/vite-plugin-svelte": "^3.1.2", "@tsconfig/svelte": "^5.0.4", "svelte": "^4.2.19", - "svelte-check": "^4.0.4", - "tslib": "^2.7.0", - "typescript": "^5.5.3", - "vite": "^5.4.8" + "svelte-check": "^4.0.5", + "tslib": "^2.8.0", + "typescript": "^5.6.3", + "vite": "^5.4.10" }, "dependencies": { - "@sveltejs/kit": "^2.7.1", + "@sveltejs/kit": "^2.7.3", "@sveltestrap/sveltestrap": "^6.2.7", "svelte-routing": "^2.13.0" } diff --git a/Front/src/lib/NavBarAutocompletable.svelte b/Front/src/lib/NavBarAutocompletable.svelte index 9c6fccd..54c4262 100644 --- a/Front/src/lib/NavBarAutocompletable.svelte +++ b/Front/src/lib/NavBarAutocompletable.svelte @@ -1,10 +1,36 @@ diff --git a/Front/tsconfig.json b/Front/tsconfig.json index df56300..1f46d53 100644 --- a/Front/tsconfig.json +++ b/Front/tsconfig.json @@ -17,5 +17,5 @@ "moduleDetection": "force" }, "include": ["src/**/*.ts", "src/**/*.js", "src/**/*.svelte"], - "references": [{ "path": "./tsconfig.node.json" }] + "references": [{ "path": "./tsconfig.json" }] } diff --git a/Modelo/RepositorioPermisos.cs b/Modelo/RepositorioPermisos.cs new file mode 100644 index 0000000..4439813 --- /dev/null +++ b/Modelo/RepositorioPermisos.cs @@ -0,0 +1,19 @@ +using Entidades; +using Microsoft.EntityFrameworkCore; + +namespace Modelo; +public class RepositorioPermisos: RepositorioBase { + public IQueryable? ListarPermisos(string email) { + var con = Context; + Cliente? cli = con.Clientes.Include(x => x.Idgrupos).FirstOrDefault(c => c.Email == email); + if (cli == null) return null; + + var list = con.Clientes + .Where(c => c.Dni == cli.Dni) + .SelectMany(c => c.Idgrupos) + .SelectMany(g => g.Idpermisos) + .Distinct(); + return list; + + } +} \ No newline at end of file