main #70

Merged
fede merged 12 commits from main into dev 2025-03-05 19:16:26 -03:00
25 changed files with 237 additions and 235 deletions

View File

@@ -81,7 +81,7 @@ public class AdminController: ControllerBase
if (mcon == null) throw new Exception();
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
.WithEndpoint("192.168.1.11:9000")
.WithEndpoint("0.0.0.0:9000")
.WithSSL(false)
.Build();
}

View File

@@ -519,10 +519,10 @@ public class ContratoController: ControllerBase {
if (mcon == null) throw new Exception();
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
.WithEndpoint("192.168.1.11:9000")
.WithEndpoint("0.0.0.0:9000")
.WithSSL(false)
.Build();
}
}
}
[HttpPost("api/contratos/subirContrato")]
@@ -768,7 +768,7 @@ public class ContratoController: ControllerBase {
Contrato? cont = RepositorioContratos.Singleton.ObtenerContratoPorId(idcontrato);
if (cont == null) return BadRequest();
if (cont.Dniinquilino != cli.Dni && cont.Dnipropietario != cli.Dni) return BadRequest();
if ((cont.Dniinquilino != cli.Dni && cont.Dnipropietario != cli.Dni)|| !RepositorioGrupos.Singleton.CheckGrupos(Auth, "Admin")) return BadRequest();
var list = cont.Idgarantes;
List<GaranteDto> l = new();
@@ -835,4 +835,4 @@ public class ContratoController: ControllerBase {
return ret;
}
}
}

View File

@@ -225,7 +225,7 @@ public class VentaController:ControllerBase {
if (mcon == null) throw new Exception();
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
.WithEndpoint("192.168.1.11:9000")
.WithEndpoint("0.0.0.0:9000")
.WithSSL(false)
.Build();
}

View File

@@ -16,7 +16,7 @@ builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddMinio(options => options
.WithCredentials(mcon.usr, mcon.scrt)
.WithEndpoint("192.168.1.11:9000")
.WithEndpoint("127.0.0.0:9000")
.WithSSL(false)
.Build());

View File

@@ -1,4 +1,4 @@
{
"usr":"aVO9C3PqeK1hiPCyqZCj",
"scrt":"szj58kceWG3GcRZ8P1QCQiv5tSjMI7iD5zfjneTT"
}
"usr":"nwFNMLJcn5m0owbzeXMs",
"scrt":"Mf9HxTir5mIGwWSBtQXd6DRK2k00V0EyXk7QTu70"
}

View File

@@ -1,4 +1,4 @@
{
"usr":"aVO9C3PqeK1hiPCyqZCj",
"scrt":"szj58kceWG3GcRZ8P1QCQiv5tSjMI7iD5zfjneTT"
}
"usr":"nwFNMLJcn5m0owbzeXMs",
"scrt":"Mf9HxTir5mIGwWSBtQXd6DRK2k00V0EyXk7QTu70"
}

View File

@@ -55,7 +55,7 @@ public partial class AlquilaFacilContext : DbContext
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
=> optionsBuilder.UseMySQL("Server=fedesrv.ddns.net;Port=30006;Database=AlquilaFacil;Uid=AlquilaFacil;Pwd=.n@9c2ve*0,b1ETv].Kipa/~pR~V;Connection Timeout=5;SslMode=none");
=> optionsBuilder.UseMySQL("Server=127.0.0.1;Port=3306;Database=AlquilaFacil;Uid=AlquilaFacil;Pwd=.n@9c2ve*0,b1ETv].Kipa/~pR~V;Connection Timeout=5;SslMode=none");
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
@@ -419,6 +419,42 @@ public partial class AlquilaFacilContext : DbContext
entity.Property(e => e.Nombre)
.HasMaxLength(12)
.HasColumnName("nombre");
entity.HasMany(d => d.IdGrupoHijos).WithMany(p => p.IdGrupoPadres)
.UsingEntity<Dictionary<string, object>>(
"GrupoSubgrupo",
r => r.HasOne<Grupo>().WithMany()
.HasForeignKey("IdGrupoHijo")
.HasConstraintName("Grupo_Subgrupo_ibfk_2"),
l => l.HasOne<Grupo>().WithMany()
.HasForeignKey("IdGrupoPadre")
.HasConstraintName("Grupo_Subgrupo_ibfk_1"),
j =>
{
j.HasKey("IdGrupoPadre", "IdGrupoHijo").HasName("PRIMARY");
j.ToTable("Grupo_Subgrupo");
j.HasIndex(new[] { "IdGrupoHijo" }, "IdGrupoHijo");
j.IndexerProperty<int>("IdGrupoPadre").HasColumnType("int(11)");
j.IndexerProperty<int>("IdGrupoHijo").HasColumnType("int(11)");
});
entity.HasMany(d => d.IdGrupoPadres).WithMany(p => p.IdGrupoHijos)
.UsingEntity<Dictionary<string, object>>(
"GrupoSubgrupo",
r => r.HasOne<Grupo>().WithMany()
.HasForeignKey("IdGrupoPadre")
.HasConstraintName("Grupo_Subgrupo_ibfk_1"),
l => l.HasOne<Grupo>().WithMany()
.HasForeignKey("IdGrupoHijo")
.HasConstraintName("Grupo_Subgrupo_ibfk_2"),
j =>
{
j.HasKey("IdGrupoPadre", "IdGrupoHijo").HasName("PRIMARY");
j.ToTable("Grupo_Subgrupo");
j.HasIndex(new[] { "IdGrupoHijo" }, "IdGrupoHijo");
j.IndexerProperty<int>("IdGrupoPadre").HasColumnType("int(11)");
j.IndexerProperty<int>("IdGrupoHijo").HasColumnType("int(11)");
});
});
modelBuilder.Entity<Log>(entity =>

View File

@@ -4,14 +4,34 @@ using System.Text.Json.Serialization;
namespace Entidades;
public partial class Grupo
public partial class Grupo:IComponenteSeguridad
{
public int Id { get; set; }
public string Nombre { get; set; } = null!;
[JsonIgnore]
public virtual ICollection<Grupo> IdGrupoHijos { get; set; } = new List<Grupo>();
[JsonIgnore]
public virtual ICollection<Grupo> IdGrupoPadres { get; set; } = new List<Grupo>();
[JsonIgnore]
public virtual ICollection<Cliente> Idclientes { get; set; } = new List<Cliente>();
public virtual ICollection<Permiso> Idpermisos { get; set; } = new List<Permiso>();
public void ObtenerPermisos(HashSet<Permiso> permisos, HashSet<int> visitados)
{
if (visitados.Contains(Id)) return;
visitados.Add(Id);
foreach (var permiso in Idpermisos) {
permisos.Add(permiso);
}
foreach (var subgrupo in IdGrupoPadres) {
subgrupo.ObtenerPermisos(permisos, visitados);
}
}
}

View File

@@ -4,12 +4,17 @@ using System.Text.Json.Serialization;
namespace Entidades;
public partial class Permiso
public partial class Permiso:IComponenteSeguridad
{
public int Id { get; set; }
public string Descripcion { get; set; } = null!;
[JsonIgnore]
public virtual ICollection<Grupo> Idgrupos { get; set; } = new List<Grupo>();
public void ObtenerPermisos(HashSet<Permiso> permisos, HashSet<int> visitados)
{
permisos.Add(this);
}
}

View File

@@ -0,0 +1,5 @@
namespace Entidades;
public interface IComponenteSeguridad {
public void ObtenerPermisos(HashSet<Permiso> permisos, HashSet<int> visitados);
}

View File

@@ -1,5 +1,5 @@
run:
dotnet ef dbcontext scaffold "Server=fedesrv.ddns.net;Port=30006;Database=AlquilaFacil;Uid=AlquilaFacil;Pwd=.n@9c2ve*0,b1ETv].Kipa/~pR~V;Connection Timeout=5;SslMode=none" MySql.EntityFrameworkCore -o .
dotnet ef dbcontext scaffold "Server=127.0.0.1;Port=3306;Database=AlquilaFacil;Uid=AlquilaFacil;Pwd=.n@9c2ve*0,b1ETv].Kipa/~pR~V;Connection Timeout=5;SslMode=none" MySql.EntityFrameworkCore -o .
./convert_to_pascalcase.sh
clean:

View File

@@ -35,59 +35,47 @@ declare module '$env/static/private' {
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 SSH_AUTH_SOCK: string;
export const GRADLE_HOME: string;
export const SHELL_SESSION_ID: string;
export const MEMORY_PRESSURE_WRITE: string;
export const XDG_CONFIG_HOME: 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 SSH_AGENT_PID: string;
export const EDITOR: string;
export const GTK_MODULES: string;
export const XDG_SEAT: string;
export const PWD: string;
export const XDG_SESSION_DESKTOP: string;
export const LOGNAME: string;
export const XDG_SESSION_DESKTOP: string;
export const XDG_SESSION_TYPE: string;
export const BUN_WHICH_IGNORE_CWD: string;
export const SYSTEMD_EXEC_PID: string;
export const PANEL_GDK_CORE_DEVICE_EVENTS: string;
export const _: string;
export const XAUTHORITY: string;
export const XDG_GREETER_DATA_DIR: string;
export const MOTD_SHOWN: string;
export const GTK2_RC_FILES: string;
export const GDM_LANG: 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 VTE_VERSION: 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_CACHE_HOME: 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 npm_lifecycle_event: string;
export const SHLVL: string;
export const PAGER: string;
export const LC_TELEPHONE: string;
@@ -101,19 +89,17 @@ declare module '$env/static/private' {
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 GTK3_MODULES: string;
export const XDG_DATA_DIRS: string;
export const KDE_FULL_SESSION: string;
export const BROWSER: string;
export const PATH: string;
export const GDMSESSION: 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;
export const NODE_ENV: string;
}
/**
@@ -154,59 +140,47 @@ declare module '$env/dynamic/private' {
LESS: string;
XDG_SESSION_PATH: string;
XDG_MENU_PREFIX: string;
ICEAUTHORITY: string;
LANGUAGE: string;
NODE: string;
LC_ADDRESS: string;
LC_NAME: string;
SSH_AUTH_SOCK: string;
GRADLE_HOME: string;
SHELL_SESSION_ID: string;
MEMORY_PRESSURE_WRITE: string;
XDG_CONFIG_HOME: string;
npm_config_local_prefix: string;
DESKTOP_SESSION: string;
LC_MONETARY: string;
GTK_RC_FILES: string;
SSH_AGENT_PID: string;
EDITOR: string;
GTK_MODULES: string;
XDG_SEAT: string;
PWD: string;
XDG_SESSION_DESKTOP: string;
LOGNAME: string;
XDG_SESSION_DESKTOP: string;
XDG_SESSION_TYPE: string;
BUN_WHICH_IGNORE_CWD: string;
SYSTEMD_EXEC_PID: string;
PANEL_GDK_CORE_DEVICE_EVENTS: string;
_: string;
XAUTHORITY: string;
XDG_GREETER_DATA_DIR: string;
MOTD_SHOWN: string;
GTK2_RC_FILES: string;
GDM_LANG: 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;
VTE_VERSION: 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_CACHE_HOME: 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;
npm_lifecycle_event: string;
SHLVL: string;
PAGER: string;
LC_TELEPHONE: string;
@@ -220,19 +194,17 @@ declare module '$env/dynamic/private' {
npm_package_json: string;
LC_TIME: string;
BUN_INSTALL: string;
QT_AUTO_SCREEN_SCALE_FACTOR: string;
JOURNAL_STREAM: string;
GTK3_MODULES: string;
XDG_DATA_DIRS: string;
KDE_FULL_SESSION: string;
BROWSER: string;
PATH: string;
GDMSESSION: 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;
NODE_ENV: string;
[key: `PUBLIC_${string}`]: undefined;
[key: `${string}`]: string | undefined;
}

View File

@@ -13,8 +13,15 @@ export const dictionary = {
export const hooks = {
handleError: (({ error }) => { console.error(error) }),
reroute: (() => {})
reroute: (() => {}),
transport: {}
};
export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));
export const hash = false;
export const decode = (type, value) => decoders[type](value);
export { default as root } from '../root.js';

View File

@@ -1,13 +1,6 @@
{
"compilerOptions": {
"paths": {
"$lib": [
"../src/lib"
],
"$lib/*": [
"../src/lib/*"
]
},
"paths": {},
"rootDirs": [
"..",
"./types"

Binary file not shown.

196
Front/package-lock.json generated
View File

@@ -8,21 +8,21 @@
"name": "front",
"version": "0.0.0",
"dependencies": {
"@sveltejs/kit": "^2.7.3",
"@sveltestrap/sveltestrap": "^6.2.7",
"@sveltestrap/sveltestrap": "^6.2.8",
"bootstrap": "^5.3.3",
"chartjs": "^0.3.24",
"svelte-routing": "^2.13.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.4",
"@tsconfig/svelte": "^5.0.4",
"prettier": "^3.4.2",
"prettier": "^3.5.0",
"prettier-plugin-svelte": "^3.3.3",
"svelte": "^5.0.0",
"svelte-check": "^4.0.5",
"tslib": "^2.8.0",
"typescript": "^5.6.3",
"vite": "^5.4.10"
"svelte": "^5.20.0",
"svelte-check": "^4.1.4",
"tslib": "^2.8.1",
"typescript": "^5.7.3",
"vite": "^5.4.14"
}
},
"node_modules/@ampproject/remapping": {
@@ -41,6 +41,7 @@
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -88,10 +89,6 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@polka/url": {
"version": "1.0.0-next.28",
"license": "MIT"
},
"node_modules/@popperjs/core": {
"version": "2.11.8",
"license": "MIT",
@@ -105,6 +102,7 @@
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -116,44 +114,16 @@
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@sveltejs/kit": {
"version": "2.7.3",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@types/cookie": "^0.6.0",
"cookie": "^0.6.0",
"devalue": "^5.1.0",
"esm-env": "^1.0.0",
"import-meta-resolve": "^4.1.0",
"kleur": "^4.1.5",
"magic-string": "^0.30.5",
"mrmime": "^2.0.0",
"sade": "^1.8.1",
"set-cookie-parser": "^2.6.0",
"sirv": "^3.0.0",
"tiny-glob": "^0.2.9"
},
"bin": {
"svelte-kit": "svelte-kit.js"
},
"engines": {
"node": ">=18.13"
},
"peerDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1",
"svelte": "^4.0.0 || ^5.0.0-next.0",
"vite": "^5.0.3"
}
},
"node_modules/@sveltejs/vite-plugin-svelte": {
"version": "4.0.0",
"version": "4.0.4",
"dev": true,
"license": "MIT",
"dependencies": {
"@sveltejs/vite-plugin-svelte-inspector": "^3.0.0-next.0||^3.0.0",
@@ -173,6 +143,7 @@
},
"node_modules/@sveltejs/vite-plugin-svelte-inspector": {
"version": "3.0.1",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "^4.3.7"
@@ -187,7 +158,7 @@
}
},
"node_modules/@sveltestrap/sveltestrap": {
"version": "6.2.7",
"version": "6.2.8",
"license": "MIT",
"dependencies": {
"@popperjs/core": "^2.11.8"
@@ -201,10 +172,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/@types/cookie": {
"version": "0.6.0",
"license": "MIT"
},
"node_modules/@types/estree": {
"version": "1.0.6",
"license": "MIT"
@@ -240,6 +207,25 @@
"node": ">= 0.4"
}
},
"node_modules/bootstrap": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz",
"integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/twbs"
},
{
"type": "opencollective",
"url": "https://opencollective.com/bootstrap"
}
],
"license": "MIT",
"peerDependencies": {
"@popperjs/core": "^2.11.8"
}
},
"node_modules/chartjs": {
"version": "0.3.24",
"license": "MIT"
@@ -258,15 +244,16 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/cookie": {
"version": "0.6.0",
"node_modules/clsx": {
"version": "2.1.1",
"license": "MIT",
"engines": {
"node": ">= 0.6"
"node": ">=6"
}
},
"node_modules/debug": {
"version": "4.3.7",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
@@ -282,17 +269,15 @@
},
"node_modules/deepmerge": {
"version": "4.3.1",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/devalue": {
"version": "5.1.1",
"license": "MIT"
},
"node_modules/esbuild": {
"version": "0.21.5",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"bin": {
@@ -328,15 +313,14 @@
}
},
"node_modules/esm-env": {
"version": "1.0.0",
"version": "1.2.2",
"license": "MIT"
},
"node_modules/esrap": {
"version": "1.2.2",
"version": "1.4.4",
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15",
"@types/estree": "^1.0.1"
"@jridgewell/sourcemap-codec": "^1.4.15"
}
},
"node_modules/fdir": {
@@ -352,31 +336,16 @@
}
}
},
"node_modules/globalyzer": {
"version": "0.1.0",
"license": "MIT"
},
"node_modules/globrex": {
"version": "0.1.2",
"license": "MIT"
},
"node_modules/import-meta-resolve": {
"version": "4.1.0",
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/is-reference": {
"version": "3.0.2",
"version": "3.0.3",
"license": "MIT",
"dependencies": {
"@types/estree": "*"
"@types/estree": "^1.0.6"
}
},
"node_modules/kleur": {
"version": "4.1.5",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -395,24 +364,20 @@
},
"node_modules/mri": {
"version": "1.2.0",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/mrmime": {
"version": "2.0.0",
"license": "MIT",
"engines": {
"node": ">=10"
}
},
"node_modules/ms": {
"version": "2.1.3",
"dev": true,
"license": "MIT"
},
"node_modules/nanoid": {
"version": "3.3.7",
"dev": true,
"funding": [
{
"type": "github",
@@ -429,10 +394,12 @@
},
"node_modules/picocolors": {
"version": "1.1.0",
"dev": true,
"license": "ISC"
},
"node_modules/postcss": {
"version": "8.4.47",
"dev": true,
"funding": [
{
"type": "opencollective",
@@ -458,9 +425,7 @@
}
},
"node_modules/prettier": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz",
"integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==",
"version": "3.5.0",
"dev": true,
"license": "MIT",
"bin": {
@@ -475,8 +440,6 @@
},
"node_modules/prettier-plugin-svelte": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.3.3.tgz",
"integrity": "sha512-yViK9zqQ+H2qZD1w/bH7W8i+bVfKrD8GIFjkFe4Thl6kCT9SlAsXVNmt3jCvQOCsnOhcvYgsoVlRV/Eu6x5nNw==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -498,6 +461,7 @@
},
"node_modules/rollup": {
"version": "4.24.0",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "1.0.6"
@@ -531,6 +495,7 @@
},
"node_modules/sade": {
"version": "1.8.1",
"dev": true,
"license": "MIT",
"dependencies": {
"mri": "^1.1.0"
@@ -539,31 +504,16 @@
"node": ">=6"
}
},
"node_modules/set-cookie-parser": {
"version": "2.7.0",
"license": "MIT"
},
"node_modules/sirv": {
"version": "3.0.0",
"license": "MIT",
"dependencies": {
"@polka/url": "^1.0.0-next.24",
"mrmime": "^2.0.0",
"totalist": "^3.0.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/source-map-js": {
"version": "1.2.1",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/svelte": {
"version": "5.1.9",
"version": "5.20.0",
"license": "MIT",
"dependencies": {
"@ampproject/remapping": "^2.3.0",
@@ -573,9 +523,10 @@
"acorn-typescript": "^1.4.13",
"aria-query": "^5.3.1",
"axobject-query": "^4.1.0",
"esm-env": "^1.0.0",
"esrap": "^1.2.2",
"is-reference": "^3.0.2",
"clsx": "^2.1.1",
"esm-env": "^1.2.1",
"esrap": "^1.4.3",
"is-reference": "^3.0.3",
"locate-character": "^3.0.0",
"magic-string": "^0.30.11",
"zimmerframe": "^1.1.2"
@@ -585,7 +536,7 @@
}
},
"node_modules/svelte-check": {
"version": "4.0.5",
"version": "4.1.4",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -610,28 +561,13 @@
"version": "2.13.0",
"license": "MIT"
},
"node_modules/tiny-glob": {
"version": "0.2.9",
"license": "MIT",
"dependencies": {
"globalyzer": "0.1.0",
"globrex": "^0.1.2"
}
},
"node_modules/totalist": {
"version": "3.0.1",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/tslib": {
"version": "2.8.0",
"version": "2.8.1",
"dev": true,
"license": "0BSD"
},
"node_modules/typescript": {
"version": "5.6.3",
"version": "5.7.3",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -643,7 +579,8 @@
}
},
"node_modules/vite": {
"version": "5.4.10",
"version": "5.4.14",
"dev": true,
"license": "MIT",
"dependencies": {
"esbuild": "^0.21.3",
@@ -701,6 +638,7 @@
},
"node_modules/vitefu": {
"version": "1.0.3",
"dev": true,
"license": "MIT",
"workspaces": [
"tests/deps/*",

View File

@@ -10,21 +10,20 @@
"check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.4",
"@tsconfig/svelte": "^5.0.4",
"prettier": "^3.4.2",
"prettier": "^3.5.0",
"prettier-plugin-svelte": "^3.3.3",
"svelte": "^5.0.0",
"svelte-check": "^4.0.5",
"tslib": "^2.8.0",
"typescript": "^5.6.3",
"vite": "^5.4.10"
"svelte": "^5.20.0",
"svelte-check": "^4.1.4",
"tslib": "^2.8.1",
"typescript": "^5.7.3",
"vite": "^5.4.14"
},
"dependencies": {
"@sveltejs/kit": "^2.7.3",
"@sveltestrap/sveltestrap": "^6.2.7",
"@sveltestrap/sveltestrap": "^6.2.8",
"bootstrap": "^5.3.3",
"chartjs": "^0.3.24",
"svelte-chartjs": "^3.1.5",
"svelte-routing": "^2.13.0"
}
}

View File

@@ -1,4 +1,5 @@
<script lang="ts">
import 'bootstrap/dist/css/bootstrap.min.css';
import Login from "./paginas/login.svelte";
import { Router, Route, link } from 'svelte-routing';
import MenuPage from './paginas/menu.svelte';

View File

@@ -59,7 +59,7 @@
disabled={!contratoDescargado}
/>
<label class="form-check-label" for="leiContratoCheckbox">
Firme el contrato con el agente de la inmobiliaria
Leí el contrato con el agente de la inmobiliaria
</label>
</div>
</div>

View File

@@ -8,7 +8,6 @@
import {urlG} from "../stores/urlStore"
import type { PropiedadDto } from "../types";
import BarraHorizontalConTexto from "../Componentes/BarraHorizontalConTexto.svelte";
import { text } from "@sveltejs/kit";
let showButton = $state(false);

View File

@@ -33,9 +33,29 @@
onMount(()=>{
getparams();
obtenerDatosACargar();
getgarantes();
});
async function getgarantes() {
try{
const ret = await fetch($urlG+"/api/contratos/garantes"+"?idcontrato="+contratoid,{
method: "GET",
headers: {
"Auth": token
},
});
if (!ret.ok){
let data = await ret.json();
modaldata = data.message;
return;
}
let data = await ret.json();
garantes = data;
return;
}catch{
modaldata = "No se pudo obtener la lista de garantes actualizada";
}
}
async function refreshCanon() {
try {
const ret = await fetch($urlG+"/api/admin/contrato/canons?id="+contratoid, {
@@ -313,4 +333,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@@ -144,9 +144,12 @@
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="hea2">
<button class="accordion-button"
<button class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#c2"
aria-expanded="false"
aria-controls="c2"
onclick={()=>{
if(visibleMesesDuracion === true){
visibleMesesDuracion=false;
@@ -194,4 +197,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@@ -9,11 +9,7 @@
import ModalPrecontrato from "../Componentes/ModalPrecontrato.svelte";
import ModalAddGarantes from "../Componentes/ModalAddGarantes.svelte";
import ModalCheckYContrato from "../Componentes/ModalCheckYContrato.svelte";
import { self } from "svelte/legacy";
import ModalVeryAceptarContrato from "../Componentes/ModalVeryAceptarContrato.svelte";
import { getRequest } from "@sveltejs/kit/node";
import { json } from "@sveltejs/kit";
import { Accordion } from "@sveltestrap/sveltestrap";
const token = sessionStorage.getItem("token");
let mensajes: MensajeDto[] = $state([]);

View File

@@ -1,3 +1,3 @@
import { readable, type Readable } from 'svelte/store';
export const urlG: Readable<string> = readable('http://localhost:5007');
export const urlG: Readable<string> = readable('http://127.0.0.1:5007');

View File

@@ -4,4 +4,12 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
ssr: {
noExternal: ['@sveltejs/kit']
},
resolve: {
alias: {
'node:stream': 'stream'
}
}
})