deploy-local-de-la-v1-del-sistema #68
@@ -81,7 +81,7 @@ public class AdminController: ControllerBase
|
|||||||
if (mcon == null) throw new Exception();
|
if (mcon == null) throw new Exception();
|
||||||
|
|
||||||
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
|
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
|
||||||
.WithEndpoint("192.168.1.11:9000")
|
.WithEndpoint("0.0.0.0:9000")
|
||||||
.WithSSL(false)
|
.WithSSL(false)
|
||||||
.Build();
|
.Build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ public class ContratoController: ControllerBase {
|
|||||||
if (mcon == null) throw new Exception();
|
if (mcon == null) throw new Exception();
|
||||||
|
|
||||||
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
|
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
|
||||||
.WithEndpoint("192.168.1.11:9000")
|
.WithEndpoint("0.0.0.0:9000")
|
||||||
.WithSSL(false)
|
.WithSSL(false)
|
||||||
.Build();
|
.Build();
|
||||||
}
|
}
|
||||||
@@ -768,7 +768,7 @@ public class ContratoController: ControllerBase {
|
|||||||
Contrato? cont = RepositorioContratos.Singleton.ObtenerContratoPorId(idcontrato);
|
Contrato? cont = RepositorioContratos.Singleton.ObtenerContratoPorId(idcontrato);
|
||||||
if (cont == null) return BadRequest();
|
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;
|
var list = cont.Idgarantes;
|
||||||
List<GaranteDto> l = new();
|
List<GaranteDto> l = new();
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public class VentaController:ControllerBase {
|
|||||||
if (mcon == null) throw new Exception();
|
if (mcon == null) throw new Exception();
|
||||||
|
|
||||||
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
|
mc = new MinioClient().WithCredentials(mcon.usr, mcon.scrt)
|
||||||
.WithEndpoint("192.168.1.11:9000")
|
.WithEndpoint("0.0.0.0:9000")
|
||||||
.WithSSL(false)
|
.WithSSL(false)
|
||||||
.Build();
|
.Build();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ builder.Services.AddEndpointsApiExplorer();
|
|||||||
builder.Services.AddSwaggerGen();
|
builder.Services.AddSwaggerGen();
|
||||||
builder.Services.AddMinio(options => options
|
builder.Services.AddMinio(options => options
|
||||||
.WithCredentials(mcon.usr, mcon.scrt)
|
.WithCredentials(mcon.usr, mcon.scrt)
|
||||||
.WithEndpoint("192.168.1.11:9000")
|
.WithEndpoint("127.0.0.0:9000")
|
||||||
.WithSSL(false)
|
.WithSSL(false)
|
||||||
.Build());
|
.Build());
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"usr":"u39RPWIpfVa5S67gGiNk",
|
"usr":"nwFNMLJcn5m0owbzeXMs",
|
||||||
"scrt":"UzNdqpwpao7Cjh3VSyvZVw7IIXW8SQ9c1F2JsttY"
|
"scrt":"Mf9HxTir5mIGwWSBtQXd6DRK2k00V0EyXk7QTu70"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"usr":"aVO9C3PqeK1hiPCyqZCj",
|
"usr":"nwFNMLJcn5m0owbzeXMs",
|
||||||
"scrt":"szj58kceWG3GcRZ8P1QCQiv5tSjMI7iD5zfjneTT"
|
"scrt":"Mf9HxTir5mIGwWSBtQXd6DRK2k00V0EyXk7QTu70"
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ public partial class AlquilaFacilContext : DbContext
|
|||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
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.
|
#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)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
@@ -419,6 +419,42 @@ public partial class AlquilaFacilContext : DbContext
|
|||||||
entity.Property(e => e.Nombre)
|
entity.Property(e => e.Nombre)
|
||||||
.HasMaxLength(12)
|
.HasMaxLength(12)
|
||||||
.HasColumnName("nombre");
|
.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 =>
|
modelBuilder.Entity<Log>(entity =>
|
||||||
|
|||||||
+21
-1
@@ -4,14 +4,34 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace Entidades;
|
namespace Entidades;
|
||||||
|
|
||||||
public partial class Grupo
|
public partial class Grupo:IComponenteSeguridad
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public string Nombre { get; set; } = null!;
|
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]
|
[JsonIgnore]
|
||||||
public virtual ICollection<Cliente> Idclientes { get; set; } = new List<Cliente>();
|
public virtual ICollection<Cliente> Idclientes { get; set; } = new List<Cliente>();
|
||||||
|
|
||||||
public virtual ICollection<Permiso> Idpermisos { get; set; } = new List<Permiso>();
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace Entidades;
|
namespace Entidades;
|
||||||
|
|
||||||
public partial class Permiso
|
public partial class Permiso:IComponenteSeguridad
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
@@ -12,4 +12,9 @@ public partial class Permiso
|
|||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual ICollection<Grupo> Idgrupos { get; set; } = new List<Grupo>();
|
public virtual ICollection<Grupo> Idgrupos { get; set; } = new List<Grupo>();
|
||||||
|
|
||||||
|
public void ObtenerPermisos(HashSet<Permiso> permisos, HashSet<int> visitados)
|
||||||
|
{
|
||||||
|
permisos.Add(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
namespace Entidades;
|
||||||
|
|
||||||
|
public interface IComponenteSeguridad {
|
||||||
|
public void ObtenerPermisos(HashSet<Permiso> permisos, HashSet<int> visitados);
|
||||||
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
run:
|
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
|
./convert_to_pascalcase.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Generated
+20
@@ -9,6 +9,7 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sveltestrap/sveltestrap": "^6.2.8",
|
"@sveltestrap/sveltestrap": "^6.2.8",
|
||||||
|
"bootstrap": "^5.3.3",
|
||||||
"chartjs": "^0.3.24",
|
"chartjs": "^0.3.24",
|
||||||
"svelte-routing": "^2.13.0"
|
"svelte-routing": "^2.13.0"
|
||||||
},
|
},
|
||||||
@@ -206,6 +207,25 @@
|
|||||||
"node": ">= 0.4"
|
"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": {
|
"node_modules/chartjs": {
|
||||||
"version": "0.3.24",
|
"version": "0.3.24",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sveltestrap/sveltestrap": "^6.2.8",
|
"@sveltestrap/sveltestrap": "^6.2.8",
|
||||||
|
"bootstrap": "^5.3.3",
|
||||||
"chartjs": "^0.3.24",
|
"chartjs": "^0.3.24",
|
||||||
"svelte-routing": "^2.13.0"
|
"svelte-routing": "^2.13.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
import Login from "./paginas/login.svelte";
|
import Login from "./paginas/login.svelte";
|
||||||
import { Router, Route, link } from 'svelte-routing';
|
import { Router, Route, link } from 'svelte-routing';
|
||||||
import MenuPage from './paginas/menu.svelte';
|
import MenuPage from './paginas/menu.svelte';
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
disabled={!contratoDescargado}
|
disabled={!contratoDescargado}
|
||||||
/>
|
/>
|
||||||
<label class="form-check-label" for="leiContratoCheckbox">
|
<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>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,9 +33,29 @@
|
|||||||
onMount(()=>{
|
onMount(()=>{
|
||||||
getparams();
|
getparams();
|
||||||
obtenerDatosACargar();
|
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() {
|
async function refreshCanon() {
|
||||||
try {
|
try {
|
||||||
const ret = await fetch($urlG+"/api/admin/contrato/canons?id="+contratoid, {
|
const ret = await fetch($urlG+"/api/admin/contrato/canons?id="+contratoid, {
|
||||||
|
|||||||
@@ -144,9 +144,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header" id="hea2">
|
<h2 class="accordion-header" id="hea2">
|
||||||
<button class="accordion-button"
|
<button class="accordion-button collapsed"
|
||||||
|
type="button"
|
||||||
data-bs-toggle="collapse"
|
data-bs-toggle="collapse"
|
||||||
data-bs-target="#c2"
|
data-bs-target="#c2"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="c2"
|
||||||
onclick={()=>{
|
onclick={()=>{
|
||||||
if(visibleMesesDuracion === true){
|
if(visibleMesesDuracion === true){
|
||||||
visibleMesesDuracion=false;
|
visibleMesesDuracion=false;
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import { readable, type Readable } from 'svelte/store';
|
import { readable, type Readable } from 'svelte/store';
|
||||||
|
|
||||||
export const urlG: Readable<string> = readable('https://fedesrv.ddns.net');
|
export const urlG: Readable<string> = readable('http://127.0.0.1:5007');
|
||||||
|
|||||||
Reference in New Issue
Block a user