diff --git a/SistemaJuridicoWebAPI/.vs/ProjectEvaluation/sistemajuridicowebapi.metadata.v7.bin b/SistemaJuridicoWebAPI/.vs/ProjectEvaluation/sistemajuridicowebapi.metadata.v7.bin index a66fb4fa..95f45ca3 100644 Binary files a/SistemaJuridicoWebAPI/.vs/ProjectEvaluation/sistemajuridicowebapi.metadata.v7.bin and b/SistemaJuridicoWebAPI/.vs/ProjectEvaluation/sistemajuridicowebapi.metadata.v7.bin differ diff --git a/SistemaJuridicoWebAPI/.vs/ProjectEvaluation/sistemajuridicowebapi.projects.v7.bin b/SistemaJuridicoWebAPI/.vs/ProjectEvaluation/sistemajuridicowebapi.projects.v7.bin index 56f99b6e..c0d5205f 100644 Binary files a/SistemaJuridicoWebAPI/.vs/ProjectEvaluation/sistemajuridicowebapi.projects.v7.bin and b/SistemaJuridicoWebAPI/.vs/ProjectEvaluation/sistemajuridicowebapi.projects.v7.bin differ diff --git a/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/DesignTimeBuild/.dtbcache.v2 b/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/DesignTimeBuild/.dtbcache.v2 index 8f92e0c2..8b2723f1 100644 Binary files a/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/DesignTimeBuild/.dtbcache.v2 and b/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/DesignTimeBuild/.dtbcache.v2 differ diff --git a/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/v17/.futdcache.v2 b/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/v17/.futdcache.v2 index 3e8c712a..33c20e1c 100644 Binary files a/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/v17/.futdcache.v2 and b/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/v17/.futdcache.v2 differ diff --git a/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/v17/.suo b/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/v17/.suo index 5e25001f..b59155a5 100644 Binary files a/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/v17/.suo and b/SistemaJuridicoWebAPI/.vs/SistemaJuridicoWebAPI/v17/.suo differ diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Controllers/SistemaController.cs b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Controllers/SistemaController.cs index 245b515f..a2c9e56e 100644 --- a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Controllers/SistemaController.cs +++ b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Controllers/SistemaController.cs @@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore; using SistemaJuridicoWebAPI.Data; using SistemaJuridicoWebAPI.Models; -using System.Reflection.Metadata.Ecma335; +using System; namespace SistemaJuridicoWebAPI.Controllers { @@ -25,7 +25,6 @@ public async Task GetAllAmbito() return Ok(await _sistemaJuridicoDbContext.PROCESSO_AMBITO.ToListAsync()); } - [HttpPost("add-ambito")] public async Task AddAmbito([FromBody] PROCESSO_AMBITO ambitoRequest) { @@ -69,6 +68,8 @@ public async Task DeleteAmbito([FromRoute] Guid id) return Ok(ambito); } + + [HttpGet("area-do-direito")] public async Task GetAllAreaDoDireito() { @@ -120,63 +121,66 @@ public async Task DeleteAreaDoDireito([FromRoute] Guid id) } - [HttpGet("condicoes-tentativa-acordo")] - public async Task GetAllCondicoesTentivaAcordo() - { - return Ok(await _sistemaJuridicoDbContext.PROCESSO_CONDICOES_TENTATIVA_ACORDO.ToListAsync()); + [HttpGet("fase")] + public async Task GetAllFase() + { + return Ok(await _sistemaJuridicoDbContext.PROCESSO_FASE.ToListAsync()); } - [HttpGet("fase")] - public async Task GetAllFase() + + [HttpGet("patrono-responsavel")] + public async Task GetAllPatronoResponsavel() { - return Ok(await _sistemaJuridicoDbContext.PROCESSO_FASE.ToListAsync()); + return Ok(await _sistemaJuridicoDbContext.PROCESSO_PATRONO_RESPONSAVEL.ToListAsync()); } - [HttpPost("add-fase")] - public async Task AddFase([FromBody] PROCESSO_FASE faseRequest) + [HttpPost("add-patrono-responsavel")] + public async Task AddPatronoResponsavel([FromBody] PROCESSO_PATRONO_RESPONSAVEL patronoresponsavelRequest) { - faseRequest.ID = Guid.NewGuid(); + patronoresponsavelRequest.ID = Guid.NewGuid(); - await _sistemaJuridicoDbContext.PROCESSO_FASE.AddAsync(faseRequest); + await _sistemaJuridicoDbContext.PROCESSO_PATRONO_RESPONSAVEL.AddAsync(patronoresponsavelRequest); await _sistemaJuridicoDbContext.SaveChangesAsync(); - return Ok(faseRequest); + return Ok(patronoresponsavelRequest); } - [HttpPut("update-fase/{id}")] - public async Task UpdateFase([FromRoute] Guid id, PROCESSO_FASE updateFaseRequest) + [HttpPut("update-patrono-responsavel/{id}")] + public async Task UpdatePatronoResponsavel([FromRoute] Guid id, PROCESSO_PATRONO_RESPONSAVEL updateFaseRequest) { - var fase = await _sistemaJuridicoDbContext.PROCESSO_FASE.FirstOrDefaultAsync(x => x.ID.Equals(id)); + var patronoresponsavel = await _sistemaJuridicoDbContext.PROCESSO_PATRONO_RESPONSAVEL.FirstOrDefaultAsync(x => x.ID.Equals(id)); - if (fase == null) + if (patronoresponsavel == null) return NotFound(); - fase.FASE = updateFaseRequest.FASE; + patronoresponsavel.PATRONO_RESPONSAVEL = updateFaseRequest.PATRONO_RESPONSAVEL; await _sistemaJuridicoDbContext.SaveChangesAsync(); - return Ok(fase); + return Ok(patronoresponsavel); } - [HttpDelete("delete-fase/{id}")] - public async Task DeleteFase([FromRoute] Guid id) + [HttpDelete("delete-patrono-responsavel/{id}")] + public async Task DeletePatronoResponsavel([FromRoute] Guid id) { - var fase = await _sistemaJuridicoDbContext.PROCESSO_FASE.FirstOrDefaultAsync(x => x.ID.Equals(id)); + var patronoresponsavel = await _sistemaJuridicoDbContext.PROCESSO_PATRONO_RESPONSAVEL.FirstOrDefaultAsync(x => x.ID.Equals(id)); - if (fase == null) + if (patronoresponsavel == null) return NotFound(); - _sistemaJuridicoDbContext.PROCESSO_FASE.Remove(fase); + _sistemaJuridicoDbContext.PROCESSO_PATRONO_RESPONSAVEL.Remove(patronoresponsavel); await _sistemaJuridicoDbContext.SaveChangesAsync(); - return Ok(fase); + return Ok(patronoresponsavel); } + + [HttpGet("foro-tribunal-orgao")] public async Task GetAllForoTribunalOrgao() { @@ -227,6 +231,7 @@ public async Task DeleteForoTribunalOrgao([FromRoute] Guid id) } + [HttpGet("motivo-do-encerramento")] public async Task GetAllMotivoDoEncerramento() { @@ -234,12 +239,7 @@ public async Task GetAllMotivoDoEncerramento() return Ok(await _sistemaJuridicoDbContext.PROCESSO_MOTIVO_DO_ENCERRAMENTO.ToListAsync()); } - [HttpGet("patrono-responsavel")] - public async Task GetAllPatronoResponsavel() - { - return Ok(await _sistemaJuridicoDbContext.PROCESSO_PATRONO_RESPONSAVEL.ToListAsync()); - } [HttpGet("status")] public async Task GetAllStatus() @@ -249,6 +249,7 @@ public async Task GetAllStatus() } + [HttpGet("tipo-de-acao")] public async Task GetAllTipoDeAcao() { @@ -300,6 +301,58 @@ public async Task DeleteTipoDeAcao([FromRoute] Guid id) + + [HttpGet("tipo-de-andamento")] + public async Task GetAllTipoDeAndamento() + { + return Ok(await _sistemaJuridicoDbContext.PROCESSO_TIPO_DE_ANDAMENTO.ToListAsync()); + } + + [HttpPost("add-tipo-de-andamento")] + public async Task AddTipoDeAndamento([FromBody] PROCESSO_TIPO_DE_ANDAMENTO tipoDeAndamentoRequest) + { + tipoDeAndamentoRequest.ID = Guid.NewGuid(); + + await _sistemaJuridicoDbContext.PROCESSO_TIPO_DE_ANDAMENTO.AddAsync(tipoDeAndamentoRequest); + + await _sistemaJuridicoDbContext.SaveChangesAsync(); + + return Ok(tipoDeAndamentoRequest); + } + + [HttpPut("update-tipo-de-andamento/{id}")] + public async Task UpdateTipoDeAndamento([FromRoute] Guid id, PROCESSO_TIPO_DE_ANDAMENTO updateTipoDeAndamentoRequest) + { + var tipoDeAndamento = await _sistemaJuridicoDbContext.PROCESSO_TIPO_DE_ANDAMENTO.FirstOrDefaultAsync(x => x.ID.Equals(id)); + + if (tipoDeAndamento == null) + return NotFound(); + + tipoDeAndamento.TIPO_DE_ANDAMENTO = updateTipoDeAndamentoRequest.TIPO_DE_ANDAMENTO; + + await _sistemaJuridicoDbContext.SaveChangesAsync(); + + return Ok(tipoDeAndamento); + } + + [HttpDelete("delete-tipo-de-andamento/{id}")] + public async Task DeleteTipoDeAndamento([FromRoute] Guid id) + { + var tipoDeAndamento = await _sistemaJuridicoDbContext.PROCESSO_TIPO_DE_ANDAMENTO.FirstOrDefaultAsync(x => x.ID.Equals(id)); + + if (tipoDeAndamento == null) + return NotFound(); + + _sistemaJuridicoDbContext.PROCESSO_TIPO_DE_ANDAMENTO.Remove(tipoDeAndamento); + + await _sistemaJuridicoDbContext.SaveChangesAsync(); + + return Ok(tipoDeAndamento); + } + + + + [HttpGet("vara")] public async Task GetAllVara() { @@ -350,6 +403,49 @@ public async Task DeleteVara([FromRoute] Guid id) } + + [HttpGet("acordo")] + public async Task GetAllAcordo() + { + return Ok(await _sistemaJuridicoDbContext.PROCESSO_ACORDO.ToListAsync()); + } + + [HttpGet("processo/all/acordo/{id}")] + public async Task GetAllProcessoAcordo([FromRoute] string id) + { + var processoAcordo = await _sistemaJuridicoDbContext.PROCESSO_ACORDO + .Where(x => x.ID_PROCESSO.Equals(id)) + .ToListAsync(); + + return Ok(processoAcordo); + } + + [HttpGet("processo/acordo/{id}")] + public async Task GetProcessoAcordo([FromRoute] Guid id) + { + var acordoRequest = await _sistemaJuridicoDbContext.PROCESSO_ACORDO.FirstOrDefaultAsync(x => x.ID.Equals(id)); + + return Ok(acordoRequest); + } + + [HttpPost("add-acordo")] + public async Task AddAcordo([FromBody] PROCESSO_ACORDO acordoRequest) + { + TimeZoneInfo brazilTimeZone = TimeZoneInfo.FindSystemTimeZoneById("America/Sao_Paulo"); + + acordoRequest.ID = Guid.NewGuid(); + + acordoRequest.DATA_ACORDO = TimeZoneInfo.ConvertTime(DateTime.Now, brazilTimeZone).ToString(); + + await _sistemaJuridicoDbContext.PROCESSO_ACORDO.AddAsync(acordoRequest); + + await _sistemaJuridicoDbContext.SaveChangesAsync(); + + return Ok(); + } + + + [HttpGet("processo")] public async Task GetAllProcess() { @@ -357,7 +453,6 @@ public async Task GetAllProcess() return Ok(await _sistemaJuridicoDbContext.PROCESSO.ToListAsync()); } - [HttpGet("processo/{id}")] public async Task GetProcess([FromRoute] Guid id) { @@ -382,5 +477,48 @@ public async Task AddProcess([FromBody] PROCESSO processoRequest) return Ok(processoRequest); } + + + + [HttpGet("andamento")] + public async Task GetAllAndamento() + { + return Ok(await _sistemaJuridicoDbContext.PROCESSO_ANDAMENTO.ToListAsync()); + } + + [HttpGet("processo/all/andamento/{id}")] + public async Task GetAllProcessoAndamento([FromRoute] string id) + { + var processoAndamento = await _sistemaJuridicoDbContext.PROCESSO_ANDAMENTO + .Where(x => x.ID_PROCESSO.Equals(id)) + .ToListAsync(); + + return Ok(processoAndamento); + } + + [HttpGet("processo/andamento/{id}")] + public async Task GetProcessoAndamento([FromRoute] Guid id) + { + var andamentoRequest = await _sistemaJuridicoDbContext.PROCESSO_ANDAMENTO.FirstOrDefaultAsync(x => x.ID.Equals(id)); + + return Ok(andamentoRequest); + } + + [HttpPost("add-andamento")] + public async Task AddAndamento([FromBody] PROCESSO_ANDAMENTO andamentoRequest) + { + TimeZoneInfo brazilTimeZone = TimeZoneInfo.FindSystemTimeZoneById("America/Sao_Paulo"); + + andamentoRequest.ID = Guid.NewGuid(); + + andamentoRequest.DATA_ANDAMENTO = TimeZoneInfo.ConvertTime(DateTime.Now, brazilTimeZone).ToString(); + + await _sistemaJuridicoDbContext.PROCESSO_ANDAMENTO.AddAsync(andamentoRequest); + + await _sistemaJuridicoDbContext.SaveChangesAsync(); + + return Ok(); + } + } } diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Data/SistemaJuridicoDbContext.cs b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Data/SistemaJuridicoDbContext.cs index 39400931..a7875b52 100644 --- a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Data/SistemaJuridicoDbContext.cs +++ b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Data/SistemaJuridicoDbContext.cs @@ -3,41 +3,44 @@ namespace SistemaJuridicoWebAPI.Data { - public class SistemaJuridicoDbContext : DbContext + public class SistemaJuridicoDbContext : DbContext + { + public SistemaJuridicoDbContext(DbContextOptions options) : base(options) { } + + public DbSet PROCESSO { get; set; } + public DbSet ANDAMENTO { get; set; } + public DbSet ACORDO { get; set; } + public DbSet USUARIO { get; set; } + public DbSet PARTE_CONTRARIA { get; set; } + public DbSet PROCESSO_AMBITO { get; set; } + public DbSet PROCESSO_AREA_DO_DIREITO { get; set; } + public DbSet PROCESSO_ACORDO { get; set; } + public DbSet PROCESSO_FASE { get; set; } + + public DbSet PROCESSO_TIPO_DE_ANDAMENTO { get; set; } + public DbSet PROCESSO_ANDAMENTO { get; set; } + public DbSet PROCESSO_FORO_TRIBUNAL_ORGAO { get; set; } + public DbSet PROCESSO_MOTIVO_DO_ENCERRAMENTO { get; set; } + public DbSet PROCESSO_PATRONO_RESPONSAVEL { get; set; } + public DbSet PROCESSO_STATUS { get; set; } + public DbSet PROCESSO_TIPO_DE_ACAO { get; set; } + public DbSet PROCESSO_VARA { get; set; } + + protected override void OnModelCreating(ModelBuilder modelBuilder) { - public SistemaJuridicoDbContext(DbContextOptions options) : base(options) {} - - public DbSet PROCESSO { get; set; } - public DbSet ANDAMENTO { get; set; } - public DbSet ACORDO { get; set; } - public DbSet USUARIO { get; set; } - public DbSet PARTE_CONTRARIA { get; set; } - public DbSet PROCESSO_AMBITO { get; set; } - public DbSet PROCESSO_AREA_DO_DIREITO { get; set; } - public DbSet PROCESSO_CONDICOES_TENTATIVA_ACORDO { get; set; } - public DbSet PROCESSO_FASE { get; set; } - public DbSet PROCESSO_FORO_TRIBUNAL_ORGAO { get; set; } - public DbSet PROCESSO_MOTIVO_DO_ENCERRAMENTO { get; set; } - public DbSet PROCESSO_PATRONO_RESPONSAVEL { get; set; } - public DbSet PROCESSO_STATUS { get; set; } - public DbSet PROCESSO_TIPO_DE_ACAO { get; set; } - public DbSet PROCESSO_VARA { get; set; } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.Entity() - .Property(c => c.ID) - .ValueGeneratedOnAdd(); - - modelBuilder.Entity() - .HasData( - new PROCESSO_AMBITO { ID = Guid.NewGuid(), AMBITO = "Administradivo" }, - new PROCESSO_AMBITO { ID = Guid.NewGuid(), AMBITO = "Judicial" }, - new PROCESSO_AMBITO { ID = Guid.NewGuid(), AMBITO = "Pré Judicial" } - ); - - - } + modelBuilder.Entity() + .Property(c => c.ID) + .ValueGeneratedOnAdd(); + + modelBuilder.Entity() + .HasData( + new PROCESSO_STATUS { ID = Guid.NewGuid(), STATUS = "Ativo" }, + new PROCESSO_STATUS { ID = Guid.NewGuid(), STATUS = "Baixa Provisória" }, + new PROCESSO_STATUS { ID = Guid.NewGuid(), STATUS = "Encerrado" } + ); + } + + } } diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Migrations/SistemaJuridicoDbContextModelSnapshot.cs b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Migrations/SistemaJuridicoDbContextModelSnapshot.cs index 69fe17f2..d6c95018 100644 --- a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Migrations/SistemaJuridicoDbContextModelSnapshot.cs +++ b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Migrations/SistemaJuridicoDbContextModelSnapshot.cs @@ -285,63 +285,55 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("PROCESSO"); }); - modelBuilder.Entity("SistemaJuridicoWebAPI.Models.PROCESSO_AMBITO", b => + modelBuilder.Entity("SistemaJuridicoWebAPI.Models.PROCESSO_ACORDO", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("AMBITO") + b.Property("CONDICOES_TENTATIVA_DE_ACORDO") .HasColumnType("nvarchar(max)"); - b.HasKey("ID"); + b.Property("DATA_ACORDO") + .HasColumnType("nvarchar(max)"); - b.ToTable("PROCESSO_AMBITO"); + b.Property("ID_PROCESSO") + .HasColumnType("nvarchar(max)"); - b.HasData( - new - { - ID = new Guid("67311d03-0444-497d-b7b0-bd7bdabf6544"), - AMBITO = "Administradivo" - }, - new - { - ID = new Guid("d118ed15-beb0-43f4-8a60-b3b32f8bd3ef"), - AMBITO = "Judicial" - }, - new - { - ID = new Guid("06228d1f-653c-4e2b-8959-4fe4f8633ead"), - AMBITO = "Pré Judicial" - }); + b.Property("VALOR_ACORDO") + .HasColumnType("nvarchar(max)"); + + b.HasKey("ID"); + + b.ToTable("PROCESSO_ACORDO"); }); - modelBuilder.Entity("SistemaJuridicoWebAPI.Models.PROCESSO_AREA_DO_DIREITO", b => + modelBuilder.Entity("SistemaJuridicoWebAPI.Models.PROCESSO_AMBITO", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("AREA_DO_DIREITO") + b.Property("AMBITO") .HasColumnType("nvarchar(max)"); b.HasKey("ID"); - b.ToTable("PROCESSO_AREA_DO_DIREITO"); + b.ToTable("PROCESSO_AMBITO"); }); - modelBuilder.Entity("SistemaJuridicoWebAPI.Models.PROCESSO_CONDICOES_TENTATIVA_ACORDO", b => + modelBuilder.Entity("SistemaJuridicoWebAPI.Models.PROCESSO_AREA_DO_DIREITO", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("CONDICOES_TENTATIVA_ACORDO") + b.Property("AREA_DO_DIREITO") .HasColumnType("nvarchar(max)"); b.HasKey("ID"); - b.ToTable("PROCESSO_CONDICOES_TENTATIVA_ACORDO"); + b.ToTable("PROCESSO_AREA_DO_DIREITO"); }); modelBuilder.Entity("SistemaJuridicoWebAPI.Models.PROCESSO_FASE", b => @@ -395,6 +387,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("PATRONO_RESPONSAVEL") .HasColumnType("nvarchar(max)"); + b.Property("PATRONO_RESPONSAVEL_CPF_CNPJ") + .HasColumnType("nvarchar(max)"); + b.HasKey("ID"); b.ToTable("PROCESSO_PATRONO_RESPONSAVEL"); @@ -412,6 +407,23 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("ID"); b.ToTable("PROCESSO_STATUS"); + + b.HasData( + new + { + ID = new Guid("232727c4-3af7-411c-8d72-643305fb2d57"), + STATUS = "Ativo" + }, + new + { + ID = new Guid("818c9240-d6f9-416f-946f-106ee0384fc0"), + STATUS = "Baixa Provisória" + }, + new + { + ID = new Guid("28345ac7-9514-4416-b195-78e5645bb95e"), + STATUS = "Encerrado" + }); }); modelBuilder.Entity("SistemaJuridicoWebAPI.Models.PROCESSO_TIPO_DE_ACAO", b => diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Models/PROCESSO_CONDICOES_TENTATIVA_ACORDO.cs b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Models/PROCESSO_CONDICOES_TENTATIVA_ACORDO.cs deleted file mode 100644 index a37d7f51..00000000 --- a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Models/PROCESSO_CONDICOES_TENTATIVA_ACORDO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.ComponentModel.DataAnnotations.Schema; -using System.ComponentModel.DataAnnotations; - -namespace SistemaJuridicoWebAPI.Models -{ - public class PROCESSO_CONDICOES_TENTATIVA_ACORDO - { - [Key] - public Guid ID { get; set; } - public string CONDICOES_TENTATIVA_ACORDO { get; set; } - } -} diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Models/PROCESSO_PATRONO_RESPONSAVEL.cs b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Models/PROCESSO_PATRONO_RESPONSAVEL.cs index e7f29f67..8bca38bd 100644 --- a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Models/PROCESSO_PATRONO_RESPONSAVEL.cs +++ b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/Models/PROCESSO_PATRONO_RESPONSAVEL.cs @@ -7,6 +7,7 @@ public class PROCESSO_PATRONO_RESPONSAVEL { [Key] public Guid ID { get; set; } - public string PATRONO_RESPONSAVEL { get ; set; } + public string PATRONO_RESPONSAVEL { get ; set; } + public string PATRONO_RESPONSAVEL_CPF_CNPJ { get; set; } } } diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/bin/Debug/net6.0/SistemaJuridicoWebAPI.dll b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/bin/Debug/net6.0/SistemaJuridicoWebAPI.dll index 82f6d97e..6591685b 100644 Binary files a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/bin/Debug/net6.0/SistemaJuridicoWebAPI.dll and b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/bin/Debug/net6.0/SistemaJuridicoWebAPI.dll differ diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/bin/Debug/net6.0/SistemaJuridicoWebAPI.pdb b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/bin/Debug/net6.0/SistemaJuridicoWebAPI.pdb index 49fc5f27..88d177d2 100644 Binary files a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/bin/Debug/net6.0/SistemaJuridicoWebAPI.pdb and b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/bin/Debug/net6.0/SistemaJuridicoWebAPI.pdb differ diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.csproj.CoreCompileInputs.cache b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.csproj.CoreCompileInputs.cache index 21e3d716..54fd704e 100644 --- a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.csproj.CoreCompileInputs.cache +++ b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -18adc7f92dce755eb093a70a23a4cccbc077fe83 +13a368c2b72f549274ab84f4c530c8d20251f4d4 diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.dll b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.dll index 82f6d97e..6591685b 100644 Binary files a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.dll and b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.dll differ diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.pdb b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.pdb index 49fc5f27..88d177d2 100644 Binary files a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.pdb and b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/SistemaJuridicoWebAPI.pdb differ diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/ref/SistemaJuridicoWebAPI.dll b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/ref/SistemaJuridicoWebAPI.dll index f0dd5165..b8cea878 100644 Binary files a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/ref/SistemaJuridicoWebAPI.dll and b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/ref/SistemaJuridicoWebAPI.dll differ diff --git a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/refint/SistemaJuridicoWebAPI.dll b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/refint/SistemaJuridicoWebAPI.dll index f0dd5165..b8cea878 100644 Binary files a/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/refint/SistemaJuridicoWebAPI.dll and b/SistemaJuridicoWebAPI/SistemaJuridicoWebAPI/obj/Debug/net6.0/refint/SistemaJuridicoWebAPI.dll differ diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 5ce58654..5f4bcbf9 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -10,6 +10,7 @@ import { MPatronoResponsavelComponent } from './components/management/components import { MAreaDoDireitoComponent } from './components/management/components/m-area-do-direito/m-area-do-direito.component'; import { MTipoDeAcaoComponent } from './components/management/components/m-tipo-de-acao/m-tipo-de-acao.component'; import { MForoTribunalOrgaoComponent } from './components/management/components/m-foro-tribunal-orgao/m-foro-tribunal-orgao.component'; +import { MTipoDeAndamentoComponent } from './components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component'; const routes: Routes = [ { @@ -58,6 +59,10 @@ const routes: Routes = [ { path: 'gestao/foro-tribunal-orgao', component: MForoTribunalOrgaoComponent + }, + { + path: 'gestao/tipo-de-andamento', + component: MTipoDeAndamentoComponent } ]; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ef480e4b..25aabb1b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -19,8 +19,8 @@ import { HttpClientModule } from '@angular/common/http'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { ProcessAreaDetailsComponent } from './components/processComponents/process-area/process-area-details/process-area-details.component'; import { ProcessAreaOpposingpartyComponent } from './components/processComponents/process-area/process-area-opposingparty/process-area-opposingparty.component'; -import { ProcessAreaDealComponent } from './components/processComponents/process-area/process-area-deal/process-area-deal.component'; -import { ProcessAreaMovementComponent } from './components/processComponents/process-area/process-area-movement/process-area-movement.component'; +import { ProcessAreaAcordoComponent } from './components/processComponents/process-area/process-area-acordo/process-area-acordo.component'; +import { ProcessAreaAndamentoComponent } from './components/processComponents/process-area/process-area-andamento/process-area-andamento.component'; import { ProcessAreaPreviousPatronsComponent } from './components/processComponents/process-area/process-area-previous-patrons/process-area-previous-patrons.component'; // Managements components @@ -40,7 +40,7 @@ import { MatIconModule } from '@angular/material/icon'; import { MatButtonModule } from '@angular/material/button'; import { MatInputModule } from '@angular/material/input'; import { MatNativeDateModule } from '@angular/material/core'; -import {MatRadioModule} from '@angular/material/radio'; +import { MatRadioModule } from '@angular/material/radio'; import { DialogEditAmbitoComponent } from './components/management/components/m-ambito/dialog-edit-ambito/dialog-edit-ambito.component'; import { DialogDeleteAmbitoComponent } from './components/management/components/m-ambito/dialog-delete-ambito/dialog-delete-ambito.component'; @@ -65,6 +65,19 @@ import { DialogEditAreaDoDireitoComponent } from './components/management/compon import { DialogAddTipoDeAcaoComponent } from './components/management/components/m-tipo-de-acao/dialog-add-tipo-de-acao/dialog-add-tipo-de-acao.component'; import { DialogDeleteTipoDeAcaoComponent } from './components/management/components/m-tipo-de-acao/dialog-delete-tipo-de-acao/dialog-delete-tipo-de-acao.component'; import { DialogEditTipoDeAcaoComponent } from './components/management/components/m-tipo-de-acao/dialog-edit-tipo-de-acao/dialog-edit-tipo-de-acao.component'; +import { ProcessCreateLegalPersonComponent } from './components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component'; +import { ProcessCreateFisicalPersonComponent } from './components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component'; + +import { DialogAddAndamentoComponent } from './components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component'; + +import { DialogAddAcordoComponent } from './components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component'; +import { DialogEditAcordoComponent } from './components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component'; +import { DialogViewAcordoComponent } from './components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component'; +import { MTipoDeAndamentoComponent } from './components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component'; +import { DialogDeleteTipoDeAndamentoComponent } from './components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component'; +import { DialogEditTipoDeAndamentoComponent } from './components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component'; +import { DialogAddTipoDeAndamentoComponent } from './components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component'; +import { DialogViewAndamentoComponent } from './components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component'; @NgModule({ declarations: [ @@ -84,8 +97,8 @@ import { DialogEditTipoDeAcaoComponent } from './components/management/component ProcessCreateAgreementComponent, ProcessAreaDetailsComponent, ProcessAreaOpposingpartyComponent, - ProcessAreaDealComponent, - ProcessAreaMovementComponent, + ProcessAreaAcordoComponent, + ProcessAreaAndamentoComponent, ProcessAreaPreviousPatronsComponent, MAmbitoComponent, @@ -117,8 +130,21 @@ import { DialogEditTipoDeAcaoComponent } from './components/management/component DialogAddTipoDeAcaoComponent, DialogDeleteTipoDeAcaoComponent, - DialogEditTipoDeAcaoComponent + DialogEditTipoDeAcaoComponent, + + ProcessCreateLegalPersonComponent, + ProcessCreateFisicalPersonComponent, + + DialogAddAndamentoComponent, + DialogAddAcordoComponent, + DialogEditAcordoComponent, + DialogViewAcordoComponent, + MTipoDeAndamentoComponent, + DialogDeleteTipoDeAndamentoComponent, + DialogEditTipoDeAndamentoComponent, + DialogAddTipoDeAndamentoComponent, + DialogViewAndamentoComponent ], imports: [ diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html index d204ebe5..19bcf79f 100644 --- a/src/app/components/header/header.component.html +++ b/src/app/components/header/header.component.html @@ -11,7 +11,7 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/app/components/management/components/m-patrono-responsavel/m-patrono-responsavel.component.ts b/src/app/components/management/components/m-patrono-responsavel/m-patrono-responsavel.component.ts index 75767dfc..29fb9555 100644 --- a/src/app/components/management/components/m-patrono-responsavel/m-patrono-responsavel.component.ts +++ b/src/app/components/management/components/m-patrono-responsavel/m-patrono-responsavel.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; -import { ProcessoPatronoResponsavel } from 'src/app/models/PROCESSO_PATRONORESPONSAVEL.model'; +import { ProcessoPatronoResponsavel } from 'src/app/models/PROCESSO_PATRONO_RESPONSAVEL.model'; import { PatronoResponsavelService } from 'src/app/services/patrono-responsavel.service'; import { DialogAddPatronoResponsavelComponent } from './dialog-add-patrono-responsavel/dialog-add-patrono-responsavel.component'; diff --git a/src/app/components/management/components/m-tipo-de-acao/m-tipo-de-acao.component.html b/src/app/components/management/components/m-tipo-de-acao/m-tipo-de-acao.component.html index f798c5f1..dcc534e2 100644 --- a/src/app/components/management/components/m-tipo-de-acao/m-tipo-de-acao.component.html +++ b/src/app/components/management/components/m-tipo-de-acao/m-tipo-de-acao.component.html @@ -3,15 +3,15 @@
-

TipoDeAcao

+

Tipo de ação

- + diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.html b/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.html new file mode 100644 index 00000000..9d3e5927 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.html @@ -0,0 +1,13 @@ +

Criar Tipo de andamento

+ +
+ + + + +
+ + +
+
+ diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.scss b/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.scss new file mode 100644 index 00000000..8898038b --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.scss @@ -0,0 +1 @@ +@import '../../../management.componnent.scss'; \ No newline at end of file diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.spec.ts b/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.spec.ts new file mode 100644 index 00000000..f12e6658 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DialogAddTipoDeAndamentoComponent } from './dialog-add-tipo-de-andamento.component'; + +describe('DialogAddTipoDeAndamentoComponent', () => { + let component: DialogAddTipoDeAndamentoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DialogAddTipoDeAndamentoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DialogAddTipoDeAndamentoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.ts b/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.ts new file mode 100644 index 00000000..201c8e86 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component.ts @@ -0,0 +1,46 @@ +import { Component, OnInit } from '@angular/core'; +import { ProcessoTipoDeAndamento } from 'src/app/models/PROCESSO_TIPO_DE_ANDAMENTO.model'; +import { TipoDeAndamentoService } from 'src/app/services/tipo-de-andamento.service'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'app-dialog-add-tipo-de-andamento', + templateUrl: './dialog-add-tipo-de-andamento.component.html', + styleUrls: ['./dialog-add-tipo-de-andamento.component.scss'] +}) +export class DialogAddTipoDeAndamentoComponent implements OnInit { + constructor( + private tipoDeAndamentoService: TipoDeAndamentoService, + public dialogRef: MatDialogRef, + ) { } + + createTipoDeAndamentoForm!: FormGroup; + + createTipoDeAndamentoRequest: ProcessoTipoDeAndamento = { + ID: '', + TIPO_DE_ANDAMENTO: '' + } + + ngOnInit(): void { + this.createTipoDeAndamentoForm = new FormGroup({ + TIPO_DE_ANDAMENTO: new FormControl('', [Validators.required]) + }); + } + + createTipoDeAndamento() { + if (this.createTipoDeAndamentoForm.valid) { + this.tipoDeAndamentoService.createTipoDeAndamento(this.createTipoDeAndamentoRequest) + .subscribe({ + next: (response) => { + this.dialogRef.close(true); + this.createTipoDeAndamentoForm.reset(); + }, + error: (response) => { + console.log(response) + } + }); + } + return; + } +} diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.html b/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.html new file mode 100644 index 00000000..4c9b405d --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.html @@ -0,0 +1,13 @@ +

Remover Tipo de andamento

+
+
+ + + + +
+ + +
+
+ diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.scss b/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.scss new file mode 100644 index 00000000..8898038b --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.scss @@ -0,0 +1 @@ +@import '../../../management.componnent.scss'; \ No newline at end of file diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.spec.ts b/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.spec.ts new file mode 100644 index 00000000..462de6b0 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DialogDeleteTipoDeAndamentoComponent } from './dialog-delete-tipo-de-andamento.component'; + +describe('DialogDeleteTipoDeAndamentoComponent', () => { + let component: DialogDeleteTipoDeAndamentoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DialogDeleteTipoDeAndamentoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DialogDeleteTipoDeAndamentoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.ts b/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.ts new file mode 100644 index 00000000..93a20e78 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component.ts @@ -0,0 +1,28 @@ +import { Component, Inject } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { TipoDeAndamentoService } from 'src/app/services/tipo-de-andamento.service'; + +@Component({ + selector: 'app-dialog-delete-tipo-de-andamento', + templateUrl: './dialog-delete-tipo-de-andamento.component.html', + styleUrls: ['./dialog-delete-tipo-de-andamento.component.scss'] +}) +export class DialogDeleteTipoDeAndamentoComponent { + constructor( + @Inject(MAT_DIALOG_DATA) public removeData: any, + private tipoDeAndamentoService: TipoDeAndamentoService, + public dialogRef: MatDialogRef + ) { } + + deleteTipoDeAndamento() { + this.tipoDeAndamentoService.deleteTipoDeAndamento(this.removeData.id) + .subscribe({ + next: (response) => { + this.dialogRef.close(true); + }, + error: (response) => { + console.log(response) + } + }); + } +} diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.html b/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.html new file mode 100644 index 00000000..b23da491 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.html @@ -0,0 +1,13 @@ +

Editar Tipo de andamento

+
+
+ + + + +
+ + +
+
+ diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.scss b/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.scss new file mode 100644 index 00000000..8898038b --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.scss @@ -0,0 +1 @@ +@import '../../../management.componnent.scss'; \ No newline at end of file diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.spec.ts b/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.spec.ts new file mode 100644 index 00000000..31a8ad11 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DialogEditTipoDeAndamentoComponent } from './dialog-edit-tipo-de-andamento.component'; + +describe('DialogEditTipoDeAndamentoComponent', () => { + let component: DialogEditTipoDeAndamentoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DialogEditTipoDeAndamentoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DialogEditTipoDeAndamentoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.ts b/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.ts new file mode 100644 index 00000000..ab1e5c79 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component.ts @@ -0,0 +1,47 @@ +import { Component, Inject, OnInit } from '@angular/core'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { TipoDeAndamentoService } from 'src/app/services/tipo-de-andamento.service'; +import { ProcessoTipoDeAndamento } from 'src/app/models/PROCESSO_TIPO_DE_ANDAMENTO.model'; + +@Component({ + selector: 'app-dialog-edit-tipo-de-andamento', + templateUrl: './dialog-edit-tipo-de-andamento.component.html', + styleUrls: ['./dialog-edit-tipo-de-andamento.component.scss'] +}) +export class DialogEditTipoDeAndamentoComponent implements OnInit { + constructor( + @Inject(MAT_DIALOG_DATA) public updateData: any, + private tipoDeAndamentoService: TipoDeAndamentoService, + public dialogRef: MatDialogRef, + ) { } + + updateTipoDeAndamentoForm!: FormGroup; + + updateTipoDeAndamentoRequest: ProcessoTipoDeAndamento = { + ID: '', + TIPO_DE_ANDAMENTO: '' + } + + ngOnInit(): void { + this.updateTipoDeAndamentoForm = new FormGroup({ + TIPO_DE_ANDAMENTO: new FormControl("", [Validators.required]) + }); + } + + updateTipoDeAndamentos() { + if (this.updateTipoDeAndamentoForm.valid) { + this.updateTipoDeAndamentoRequest.TIPO_DE_ANDAMENTO = this.updateData.value; + this.tipoDeAndamentoService.updateTipoDeAndamento(this.updateData.id, this.updateTipoDeAndamentoRequest) + .subscribe({ + next: (response) => { + this.dialogRef.close(true); + }, + error: (response) => { + console.log(response) + } + }); + } + return; + } +} diff --git a/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.html b/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.html new file mode 100644 index 00000000..a8711e02 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.html @@ -0,0 +1,52 @@ +
+
+
+
+
+

Tipo de andamentos

+ +
+
TipoDeAcaoTipo de ação
+ + + + + + + + + + + + + +
Tipo de andamento
{{tipoDeAndamento.TIPO_DE_ANDAMENTO}} + + + + + + + + + + + + +
+
+
+ + diff --git a/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.scss b/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.scss new file mode 100644 index 00000000..c6306ce1 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.scss @@ -0,0 +1,2 @@ +@import '../../management.componnent.scss'; +@import '../../../processComponents/process-area/process-area.component.scss'; diff --git a/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.spec.ts b/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.spec.ts new file mode 100644 index 00000000..c9c0564a --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MTipoDeAndamentoComponent } from './m-tipo-de-andamento.component'; + +describe('MTipoDeAndamentoComponent', () => { + let component: MTipoDeAndamentoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ MTipoDeAndamentoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(MTipoDeAndamentoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.ts b/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.ts new file mode 100644 index 00000000..7e0d8989 --- /dev/null +++ b/src/app/components/management/components/m-tipo-de-andamento/m-tipo-de-andamento.component.ts @@ -0,0 +1,70 @@ +import { Component, OnInit } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { ProcessoTipoDeAndamento } from 'src/app/models/PROCESSO_TIPO_DE_ANDAMENTO.model'; +import { TipoDeAndamentoService } from 'src/app/services/tipo-de-andamento.service'; + +import { DialogAddTipoDeAndamentoComponent } from './dialog-add-tipo-de-andamento/dialog-add-tipo-de-andamento.component'; +import { DialogDeleteTipoDeAndamentoComponent } from './dialog-delete-tipo-de-andamento/dialog-delete-tipo-de-andamento.component'; +import { DialogEditTipoDeAndamentoComponent } from './dialog-edit-tipo-de-andamento/dialog-edit-tipo-de-andamento.component'; + +@Component({ + selector: 'app-m-tipo-de-andamento', + templateUrl: './m-tipo-de-andamento.component.html', + styleUrls: ['./m-tipo-de-andamento.component.scss'], +}) +export class MTipoDeAndamentoComponent implements OnInit { + constructor( + public dialog: MatDialog, + private tipoDeAndamentoService: TipoDeAndamentoService + ) { } + + tipoDeAndamentos: ProcessoTipoDeAndamento[] = []; + + ngOnInit(): void { + this.loadTipoDeAndamentos(); + } + + loadTipoDeAndamentos() { + this.tipoDeAndamentoService.getAllTipoDeAndamento() + .subscribe({ + next: (tipoDeAndamentos: any) => { + this.tipoDeAndamentos = tipoDeAndamentos; + }, + error: (response: any) => { + console.log(response) + } + }) + } + + openDialogAdd(enterAnimationDuration: string, exitAnimationDuration: string): void { + const dialogRefAdd = this.dialog.open(DialogAddTipoDeAndamentoComponent, { + width: '350px', + enterAnimationDuration, + exitAnimationDuration, + }); + + dialogRefAdd.afterClosed().subscribe(result => { result ? this.loadTipoDeAndamentos() : null; }) + } + + openDialogRemove(enterAnimationDuration: string, exitAnimationDuration: string, event: Event, id: String | undefined): void { + const dialogRefRemove = this.dialog.open(DialogDeleteTipoDeAndamentoComponent, { + width: '350px', + data: { value: (event.currentTarget as HTMLElement).previousElementSibling?.previousElementSibling?.innerHTML, id: id }, + enterAnimationDuration, + exitAnimationDuration, + }); + + dialogRefRemove.afterClosed().subscribe(result => { result ? this.loadTipoDeAndamentos() : null; }) + } + + openDialogEdit(enterAnimationDuration: string, exitAnimationDuration: string, event: Event, id: String | undefined): void { + const dialogRefEdit = this.dialog.open(DialogEditTipoDeAndamentoComponent, { + width: '350px', + data: { value: (event.currentTarget as HTMLElement).previousElementSibling?.innerHTML, id: id }, + enterAnimationDuration, + exitAnimationDuration, + }); + + dialogRefEdit.afterClosed().subscribe(result => { result ? this.loadTipoDeAndamentos() : null; }) + } +} diff --git a/src/app/components/management/management.componnent.scss b/src/app/components/management/management.componnent.scss index 6e574dc1..c19cf8e8 100644 --- a/src/app/components/management/management.componnent.scss +++ b/src/app/components/management/management.componnent.scss @@ -11,7 +11,7 @@ input { .mat-mdc-form-field { width: 100%; - height: 35px; + min-height: 35px; border-radius: 2px; border: 1px solid rgba(60, 64, 67, 0.5); } @@ -31,4 +31,4 @@ svg { &:hover { cursor: pointer; } -} \ No newline at end of file +} diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.html b/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.html new file mode 100644 index 00000000..1490b95e --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.html @@ -0,0 +1,20 @@ +

Adicionar Acordo

+
+
+ + + + + + +
+
+ + +
+
+
+
\ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.scss b/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.scss new file mode 100644 index 00000000..278f5c02 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.scss @@ -0,0 +1,2 @@ +@import '../../../../management/management.componnent.scss'; +@import '../process-area-acordo.component.scss'; \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.spec.ts b/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.spec.ts similarity index 51% rename from src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.spec.ts rename to src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.spec.ts index 40205378..f3615402 100644 --- a/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.spec.ts +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.spec.ts @@ -1,18 +1,18 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ProcessAreaDealComponent } from './process-area-deal.component'; +import { DialogAddAcordoComponent } from './dialog-add-acordo.component'; -describe('ProcessAreaDealComponent', () => { - let component: ProcessAreaDealComponent; - let fixture: ComponentFixture; +describe('DialogAddAcordoComponent', () => { + let component: DialogAddAcordoComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ ProcessAreaDealComponent ] + declarations: [ DialogAddAcordoComponent ] }) .compileComponents(); - fixture = TestBed.createComponent(ProcessAreaDealComponent); + fixture = TestBed.createComponent(DialogAddAcordoComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.ts b/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.ts new file mode 100644 index 00000000..de44a183 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-add-acordo/dialog-add-acordo.component.ts @@ -0,0 +1,52 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { ProcessoAcordo } from '../../../../../models/PROCESSO_ACORDO.model' +import { AcordoService } from 'src/app/services/acordo.service'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'app-dialog-add-acordo', + templateUrl: './dialog-add-acordo.component.html', + styleUrls: ['./dialog-add-acordo.component.scss'] +}) +export class DialogAddAcordoComponent implements OnInit { + constructor( + @Inject(MAT_DIALOG_DATA) public addData: any, + private acordoService: AcordoService, + public dialogRef: MatDialogRef, + ) { } + + createAcordoForm!: FormGroup; + + createAcordoRequest: ProcessoAcordo = { + ID: '', + DATA_ACORDO: '', + ID_PROCESSO: '', + VALOR_ACORDO: '', + CRIADOR_ACORDO: '', + CONDICOES_TENTATIVA_DE_ACORDO: '' + } + + ngOnInit(): void { + this.createAcordoForm = new FormGroup({ + VALOR_ACORDO: new FormControl('', [Validators.required]), + CONDICOES_TENTATIVA_DE_ACORDO: new FormControl('', [Validators.required]) + }); + } + + createAcordo() { + if (this.createAcordoForm.valid) { + this.acordoService.createAcordo(this.createAcordoRequest, this.addData.id) + .subscribe({ + next: (response) => { + this.dialogRef.close(true); + this.createAcordoForm.reset(); + }, + error: (response) => { + console.log(response) + } + }); + } + return; + } +} diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.html b/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.html new file mode 100644 index 00000000..3014947d --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.html @@ -0,0 +1,13 @@ +

Editar Acordo

+
+
+ + + + +
+ + +
+
+
diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.scss b/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.scss new file mode 100644 index 00000000..278f5c02 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.scss @@ -0,0 +1,2 @@ +@import '../../../../management/management.componnent.scss'; +@import '../process-area-acordo.component.scss'; \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.spec.ts b/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.spec.ts new file mode 100644 index 00000000..dd3e248b --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DialogEditAcordoComponent } from './dialog-edit-acordo.component'; + +describe('DialogEditAcordoComponent', () => { + let component: DialogEditAcordoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DialogEditAcordoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DialogEditAcordoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.ts b/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.ts new file mode 100644 index 00000000..aef67e13 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-edit-acordo/dialog-edit-acordo.component.ts @@ -0,0 +1,51 @@ +import { Component, Inject, OnInit } from '@angular/core'; +import { AcordoService } from 'src/app/services/acordo.service'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { ProcessoAcordo } from 'src/app/models/PROCESSO_ACORDO.model'; + +@Component({ + selector: 'app-dialog-edit-acordo', + templateUrl: './dialog-edit-acordo.component.html', + styleUrls: ['./dialog-edit-acordo.component.scss'] +}) +export class DialogEditAcordoComponent implements OnInit { + constructor( + @Inject(MAT_DIALOG_DATA) public updateData: any, + private acordoService: AcordoService, + public dialogRef: MatDialogRef, + ) { } + + updateAcordoForm!: FormGroup; + + updateAcordoRequest: ProcessoAcordo = { + ID: '', + DATA_ACORDO: '', + CRIADOR_ACORDO: '', + VALOR_ACORDO: '', + ID_PROCESSO: '', + CONDICOES_TENTATIVA_DE_ACORDO: '' + } + + ngOnInit(): void { + this.updateAcordoForm = new FormGroup({ + ACORDO: new FormControl("", [Validators.required]) + }); + } + + updateAcordo() { + if (this.updateAcordoForm.valid) { + this.updateAcordoRequest.CONDICOES_TENTATIVA_DE_ACORDO = this.updateData.value; + this.acordoService.updateAcordo(this.updateData.id, this.updateAcordoRequest) + .subscribe({ + next: (response) => { + this.dialogRef.close(true); + }, + error: (response) => { + console.log(response) + } + }); + } + return; + } +} diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.html b/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.html new file mode 100644 index 00000000..9ba32e00 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.html @@ -0,0 +1,19 @@ +

Detalhes acordo

+
+
+ + + + + + +
+
+ +
+
+
+
\ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.scss b/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.scss new file mode 100644 index 00000000..278f5c02 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.scss @@ -0,0 +1,2 @@ +@import '../../../../management/management.componnent.scss'; +@import '../process-area-acordo.component.scss'; \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.spec.ts b/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.spec.ts new file mode 100644 index 00000000..cd7be952 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DialogViewAcordoComponent } from './dialog-view-acordo.component'; + +describe('DialogViewAcordoComponent', () => { + let component: DialogViewAcordoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DialogViewAcordoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DialogViewAcordoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.ts b/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.ts new file mode 100644 index 00000000..6448e28a --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/dialog-view-acordo/dialog-view-acordo.component.ts @@ -0,0 +1,48 @@ +import { Component, Inject, OnInit } from '@angular/core'; +import { FormControl, FormGroup } from '@angular/forms'; +import { MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { ProcessoAcordo } from 'src/app/models/PROCESSO_ACORDO.model'; +import { AcordoService } from 'src/app/services/acordo.service'; + +@Component({ + selector: 'app-dialog-view-acordo', + templateUrl: './dialog-view-acordo.component.html', + styleUrls: ['./dialog-view-acordo.component.scss'] +}) +export class DialogViewAcordoComponent implements OnInit { + + constructor( + @Inject(MAT_DIALOG_DATA) public viewData: any, + private acordoService: AcordoService + ) { } + + viewAcordoForm!: FormGroup; + + acordoDetalhes: ProcessoAcordo = { + ID: '', + DATA_ACORDO: '', + VALOR_ACORDO: '', + ID_PROCESSO: '', + CRIADOR_ACORDO: '', + CONDICOES_TENTATIVA_DE_ACORDO: '' + }; + + ngOnInit(): void { + this.viewAcordoForm = new FormGroup({ + VALOR_ACORDO: new FormControl('',), + CONDICOES_TENTATIVA_DE_ACORDO: new FormControl('',) + }); + + this.acordoService.getProcessoAcordo(this.viewData.id) + .subscribe({ + next: (response) => { + // response.VALOR_ACORDO += ",00" + this.acordoDetalhes = response; + }, + error: (response) => { + console.log(response) + } + }) + } + +} diff --git a/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.html b/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.html new file mode 100644 index 00000000..2b569271 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.html @@ -0,0 +1,67 @@ +
+
+
+
+
+

Acordo

+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
Valor acordoData/HoraAberto por
+ {{ acordo.VALOR_ACORDO }} + + {{ + acordo.DATA_ACORDO + .replaceAll("PM","") + .replaceAll("AM","") + .slice(0, (acordo.DATA_ACORDO.length - 1) - 5) + }} + {{acordo.CRIADOR_ACORDO }} + + + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.scss b/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.scss new file mode 100644 index 00000000..a4e70ca2 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.scss @@ -0,0 +1,7 @@ +.mat-mdc-dialog-content { + max-height: none !important; +} + +textarea { + resize: none; +} \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.spec.ts b/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.spec.ts new file mode 100644 index 00000000..e6f11fba --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProcessAreaAcordoComponent } from './process-area-acordo.component'; + +describe('MAcordoComponent', () => { + let component: ProcessAreaAcordoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ProcessAreaAcordoComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ProcessAreaAcordoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.ts b/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.ts new file mode 100644 index 00000000..45196132 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-acordo/process-area-acordo.component.ts @@ -0,0 +1,84 @@ +import { Component, OnInit } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { ProcessoAcordo } from '../../../../models/PROCESSO_ACORDO.model' +import { AcordoService } from 'src/app/services/acordo.service'; + +import { DialogAddAcordoComponent } from './dialog-add-acordo/dialog-add-acordo.component'; +import { DialogEditAcordoComponent } from './dialog-edit-acordo/dialog-edit-acordo.component'; + +import { ActivatedRoute } from '@angular/router'; +import { DialogViewAcordoComponent } from './dialog-view-acordo/dialog-view-acordo.component'; + +@Component({ + selector: 'app-process-area-acordo', + templateUrl: './process-area-acordo.component.html', + styleUrls: ['./process-area-acordo.component.scss'] +}) +export class ProcessAreaAcordoComponent implements OnInit { + constructor( + private route: ActivatedRoute, + public dialog: MatDialog, + private acordoService: AcordoService + ) { } + + idProcesso: any; + + acordos: ProcessoAcordo[] = []; + + ngOnInit(): void { + this.loadAcordos() + } + + loadAcordos() { + this.route.paramMap.subscribe({ + next: (params) => { + this.idProcesso = params.get('id'); + this.acordoService.getAllProcessoAcordo(this.idProcesso) + .subscribe({ + next: (response) => { + this.acordos = response; + }, + error: (response) => { + console.log(response) + } + }) + } + }) + } + + openDialogAdd(enterAnimationDuration: string, exitAnimationDuration: string): void { + const dialogRefAdd = this.dialog.open(DialogAddAcordoComponent, { + height: '600px', + width: '750px', + data: { id: this.idProcesso }, + enterAnimationDuration, + exitAnimationDuration, + }); + + dialogRefAdd.afterClosed().subscribe(result => { result ? this.loadAcordos() : null; }) + } + + openDialogView(enterAnimationDuration: string, exitAnimationDuration: string, event: Event, id: String | undefined): void { + const dialogRefEdit = this.dialog.open(DialogViewAcordoComponent, { + height: '600px', + width: '750px', + data: { value: (event.currentTarget as HTMLElement).previousElementSibling?.innerHTML, id: id }, + enterAnimationDuration, + exitAnimationDuration, + }); + + dialogRefEdit.afterClosed().subscribe(result => { result ? this.loadAcordos() : null; }) + } + + openDialogEdit(enterAnimationDuration: string, exitAnimationDuration: string, event: Event, id: String | undefined): void { + const dialogRefEdit = this.dialog.open(DialogEditAcordoComponent, { + height: '600px', + width: '750px', + data: { value: (event.currentTarget as HTMLElement).previousElementSibling?.innerHTML, id: id }, + enterAnimationDuration, + exitAnimationDuration, + }); + + dialogRefEdit.afterClosed().subscribe(result => { result ? this.loadAcordos() : null; }) + } +} diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.html b/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.html new file mode 100644 index 00000000..f91c4869 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.html @@ -0,0 +1,21 @@ +

Adicionar Andamento

+
+
+ + + + +
+
+ + +
+
+
+
\ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.scss b/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.scss new file mode 100644 index 00000000..8f73c505 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.scss @@ -0,0 +1,7 @@ +@import '../../../../../../styles.scss'; +@import '../process-area-andamento.component.scss'; +@import '../../../../management/management.componnent.scss'; + +select { + @extend .input; +} \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.spec.ts b/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.spec.ts new file mode 100644 index 00000000..ff254ee2 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DialogAddAndamentoComponent } from './dialog-add-andamento.component'; + +describe('DialogAddAndamentoComponent', () => { + let component: DialogAddAndamentoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DialogAddAndamentoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DialogAddAndamentoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.ts b/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.ts new file mode 100644 index 00000000..73d5ba95 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-add-andamento/dialog-add-andamento.component.ts @@ -0,0 +1,69 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { ProcessoAndamento } from '../../../../../models/PROCESSO_ANDAMENTO.model' +import { AndamentoService } from 'src/app/services/andamento.service'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { TipoDeAndamentoService } from 'src/app/services/tipo-de-andamento.service'; +import { ProcessoTipoDeAndamento } from 'src/app/models/PROCESSO_TIPO_DE_ANDAMENTO.model'; + +@Component({ + selector: 'app-dialog-add-andamento', + templateUrl: './dialog-add-andamento.component.html', + styleUrls: ['./dialog-add-andamento.component.scss'] +}) +export class DialogAddAndamentoComponent implements OnInit { + constructor( + @Inject(MAT_DIALOG_DATA) public addData: any, + private andamentoService: AndamentoService, + private tipoDeAndamentoService: TipoDeAndamentoService, + public dialogRef: MatDialogRef, + ) { } + + tiposAndamentos: ProcessoTipoDeAndamento[] = []; + + createAndamentoForm!: FormGroup; + + createAndamentoRequest: ProcessoAndamento = { + ID: '', + TIPO_DE_ANDAMENTO: '', + DATA_ANDAMENTO: '', + ID_PROCESSO: '', + CRIADOR_ANDAMENTO: '', + DESC_ANDAMENTO: '', + DATA_CADASTRO: '', + } + + ngOnInit(): void { + + this.tipoDeAndamentoService.getAllTipoDeAndamento() + .subscribe({ + next: (response) => { + this.tiposAndamentos = response; + }, + error: (response) => { + console.log(response) + } + }) + + this.createAndamentoForm = new FormGroup({ + DESC_ANDAMENTO: new FormControl('', [Validators.required]), + TIPO_DE_ANDAMENTO: new FormControl('', [Validators.required]) + }); + } + + createAndamento() { + if (this.createAndamentoForm.valid) { + this.andamentoService.createAndamento(this.createAndamentoRequest, this.addData.id) + .subscribe({ + next: (response) => { + this.dialogRef.close(true); + this.createAndamentoForm.reset(); + }, + error: (response) => { + console.log(response) + } + }); + } + return; + } +} diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.html b/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.html new file mode 100644 index 00000000..0ccba846 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.html @@ -0,0 +1 @@ +

dialog-edit-movement works!

diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.scss b/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.scss new file mode 100644 index 00000000..a7598f69 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.scss @@ -0,0 +1,2 @@ +@import '../process-area-andamento.component.scss'; +@import '../../../../management/management.componnent.scss'; \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.spec.ts b/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.spec.ts new file mode 100644 index 00000000..e59080ef --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DialogEditMovementComponent } from './dialog-edit-movement.component'; + +describe('DialogEditMovementComponent', () => { + let component: DialogEditMovementComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DialogEditMovementComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DialogEditMovementComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.ts b/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.ts new file mode 100644 index 00000000..cdc50d6b --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-edit-andamento/dialog-edit-andamento.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-dialog-edit-movement', + templateUrl: './dialog-edit-movement.component.html', + styleUrls: ['./dialog-edit-movement.component.scss'] +}) +export class DialogEditMovementComponent { + +} diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.html b/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.html new file mode 100644 index 00000000..b76c00fa --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.html @@ -0,0 +1,18 @@ +

Detalhes andamento

+
+
+ + + + + + +
+
+ +
+
+
+
\ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.scss b/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.scss new file mode 100644 index 00000000..8f73c505 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.scss @@ -0,0 +1,7 @@ +@import '../../../../../../styles.scss'; +@import '../process-area-andamento.component.scss'; +@import '../../../../management/management.componnent.scss'; + +select { + @extend .input; +} \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.spec.ts b/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.spec.ts new file mode 100644 index 00000000..6138884c --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DialogViewAndamentoComponent } from './dialog-view-andamento.component'; + +describe('DialogViewAndamentoComponent', () => { + let component: DialogViewAndamentoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DialogViewAndamentoComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DialogViewAndamentoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.ts b/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.ts new file mode 100644 index 00000000..519b9d16 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/dialog-view-andamento/dialog-view-andamento.component.ts @@ -0,0 +1,49 @@ +import { Component, Inject, OnInit } from '@angular/core'; +import { FormControl, FormGroup } from '@angular/forms'; +import { MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { ProcessoAndamento } from 'src/app/models/PROCESSO_ANDAMENTO.model'; +import { AndamentoService } from 'src/app/services/andamento.service'; + +@Component({ + selector: 'app-dialog-view-andamento', + templateUrl: './dialog-view-andamento.component.html', + styleUrls: ['./dialog-view-andamento.component.scss'] +}) +export class DialogViewAndamentoComponent implements OnInit { + constructor( + @Inject(MAT_DIALOG_DATA) public viewData: any, + private andamentoService: AndamentoService + ) { } + + viewAcordoForm!: FormGroup; + + andamentoDetalhes: ProcessoAndamento = { + ID: '', + TIPO_DE_ANDAMENTO: '', + DATA_ANDAMENTO: '', + ID_PROCESSO: '', + CRIADOR_ANDAMENTO: '', + DESC_ANDAMENTO: '', + DATA_CADASTRO: '', + }; + + ngOnInit(): void { + + let myVariable: boolean = true; + + this.viewAcordoForm = new FormGroup({ + TIPO_DE_ANDAMENTO: new FormControl('',), + DESC_ANDAMENTO: new FormControl('',) + }); + + this.andamentoService.getProcessoAndamento(this.viewData.id) + .subscribe({ + next: (response) => { + this.andamentoDetalhes = response; + }, + error: (response) => { + console.log(response) + } + }) + } +} diff --git a/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.html b/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.html new file mode 100644 index 00000000..9ba3ad38 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.html @@ -0,0 +1,67 @@ +
+
+
+
+
+

Andamento

+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
Tipo de andamentoData/HoraAberto por
+ {{ andamento.TIPO_DE_ANDAMENTO }} + + {{ + andamento.DATA_ANDAMENTO + .replaceAll("PM","") + .replaceAll("AM","") + .slice(0, (andamento.DATA_ANDAMENTO.length - 1) - 5) + }} + {{andamento.CRIADOR_ANDAMENTO }} + + + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.scss b/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.scss new file mode 100644 index 00000000..a4e70ca2 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.scss @@ -0,0 +1,7 @@ +.mat-mdc-dialog-content { + max-height: none !important; +} + +textarea { + resize: none; +} \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.spec.ts b/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.spec.ts new file mode 100644 index 00000000..3bd3d1b3 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProcessAreaAndamentoComponent } from './process-area-andamento.component'; + +describe('MAndamentoComponent', () => { + let component: ProcessAreaAndamentoComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ProcessAreaAndamentoComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ProcessAreaAndamentoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.ts b/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.ts new file mode 100644 index 00000000..6188ed72 --- /dev/null +++ b/src/app/components/processComponents/process-area/process-area-andamento/process-area-andamento.component.ts @@ -0,0 +1,83 @@ +import { Component, OnInit } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { ProcessoAndamento } from '../../../../models/PROCESSO_ANDAMENTO.model' + +import { DialogAddAndamentoComponent } from './dialog-add-andamento/dialog-add-andamento.component'; + +import { ActivatedRoute } from '@angular/router'; +import { AndamentoService } from 'src/app/services/andamento.service'; +import { DialogViewAndamentoComponent } from './dialog-view-andamento/dialog-view-andamento.component'; + +@Component({ + selector: 'app-process-area-andamento', + templateUrl: './process-area-andamento.component.html', + styleUrls: ['./process-area-andamento.component.scss'] +}) +export class ProcessAreaAndamentoComponent implements OnInit { + constructor( + private route: ActivatedRoute, + public dialog: MatDialog, + private andamentoService: AndamentoService + ) { } + + idProcesso: any; + + andamentos: ProcessoAndamento[] = []; + + ngOnInit(): void { + this.loadAndamentos() + } + + loadAndamentos() { + this.route.paramMap.subscribe({ + next: (params) => { + this.idProcesso = params.get('id'); + this.andamentoService.getAllProcessoAndamento(this.idProcesso) + .subscribe({ + next: (response) => { + this.andamentos = response; + }, + error: (response) => { + console.log(response) + } + }) + } + }) + } + + openDialogAdd(enterAnimationDuration: string, exitAnimationDuration: string): void { + const dialogRefAdd = this.dialog.open(DialogAddAndamentoComponent, { + height: '600px', + width: '750px', + data: { id: this.idProcesso }, + enterAnimationDuration, + exitAnimationDuration, + }); + + dialogRefAdd.afterClosed().subscribe(result => { result ? this.loadAndamentos() : null; }) + } + + openDialogView(enterAnimationDuration: string, exitAnimationDuration: string, event: Event, id: String | undefined): void { + const dialogRefEdit = this.dialog.open(DialogViewAndamentoComponent, { + height: '600px', + width: '750px', + data: { value: (event.currentTarget as HTMLElement).previousElementSibling?.innerHTML, id: id }, + enterAnimationDuration, + exitAnimationDuration, + }); + + dialogRefEdit.afterClosed().subscribe(result => { result ? this.loadAndamentos() : null; }) + } + + // openDialogEdit(enterAnimationDuration: string, exitAnimationDuration: string, event: Event, id: String | undefined): void { + // const dialogRefEdit = this.dialog.open(DialogEditAndamentoComponent, { + // height: '600px', + // width: '750px', + // data: { value: (event.currentTarget as HTMLElement).previousElementSibling?.innerHTML, id: id }, + // enterAnimationDuration, + // exitAnimationDuration, + // }); + + // dialogRefEdit.afterClosed().subscribe(result => { result ? this.loadAndamentos() : null; }) + // } +} diff --git a/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.html b/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.html deleted file mode 100644 index 383aea1a..00000000 --- a/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Valor AcordoData/HoraAberto por
20.0000,0020/05/2023Nigela Santos
20.0000,0020/05/2023Nigela Santos
20.0000,0020/05/2023Nigela Santos
\ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.scss b/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.ts b/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.ts deleted file mode 100644 index 45625751..00000000 --- a/src/app/components/processComponents/process-area/process-area-deal/process-area-deal.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-process-area-deal', - templateUrl: './process-area-deal.component.html', - styleUrls: ['./process-area-deal.component.scss'] -}) -export class ProcessAreaDealComponent { - -} diff --git a/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.html b/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.html deleted file mode 100644 index 3303c0af..00000000 --- a/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.html +++ /dev/null @@ -1,93 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tipo de andamentoData do AndamentoData/HoraAnexoAberto Por
Recebimento de Citação20/05/202310/05/2023Nigela Santos
Recebimento de Citação20/05/202310/05/2023Nigela Santos
Recebimento de Citação20/05/202310/05/2023Nigela Santos
-
- - \ No newline at end of file diff --git a/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.scss b/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.spec.ts b/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.spec.ts deleted file mode 100644 index 1017988a..00000000 --- a/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ProcessAreaMovementComponent } from './process-area-movement.component'; - -describe('ProcessAreaMovementComponent', () => { - let component: ProcessAreaMovementComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ ProcessAreaMovementComponent ] - }) - .compileComponents(); - - fixture = TestBed.createComponent(ProcessAreaMovementComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.ts b/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.ts deleted file mode 100644 index 10a84c34..00000000 --- a/src/app/components/processComponents/process-area/process-area-movement/process-area-movement.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-process-area-movement', - templateUrl: './process-area-movement.component.html', - styleUrls: ['./process-area-movement.component.scss'] -}) -export class ProcessAreaMovementComponent { - -} diff --git a/src/app/components/processComponents/process-area/process-area-opposingparty/process-area-opposingparty.component.html b/src/app/components/processComponents/process-area/process-area-opposingparty/process-area-opposingparty.component.html index f9112430..74a0baf6 100644 --- a/src/app/components/processComponents/process-area/process-area-opposingparty/process-area-opposingparty.component.html +++ b/src/app/components/processComponents/process-area/process-area-opposingparty/process-area-opposingparty.component.html @@ -94,19 +94,19 @@

Parte Contrária

  • Nome

    -

    CPF

    -

    RG

    -
    @@ -116,23 +116,24 @@

    Parte Contrária

  • CEP

    -

    Endereço

    -

    Número

    -

    Complemento

    -
    @@ -144,24 +145,25 @@

    Parte Contrária

    Cargo

    - +

    Ultimo Salário

    -

    Data de admissão

    -

    Data de demissão

    -
    diff --git a/src/app/components/processComponents/process-area/process-area.component.html b/src/app/components/processComponents/process-area/process-area.component.html index ffddcb8a..2eea9920 100644 --- a/src/app/components/processComponents/process-area/process-area.component.html +++ b/src/app/components/processComponents/process-area/process-area.component.html @@ -3,42 +3,29 @@
    - - Processo - Parte - Contraria - Acordos - Andamentos - Patronos - Anteriores - - - + Anteriores
    - + - + - - + + diff --git a/src/app/components/processComponents/process-area/process-area.component.ts b/src/app/components/processComponents/process-area/process-area.component.ts index 8cad9229..16117b92 100644 --- a/src/app/components/processComponents/process-area/process-area.component.ts +++ b/src/app/components/processComponents/process-area/process-area.component.ts @@ -10,7 +10,10 @@ import { ProcessoService } from 'src/app/services/processo.service'; }) export class ProcessAreaComponent implements OnInit { - constructor(private route: ActivatedRoute, private processoService: ProcessoService) { } + constructor( + private route: ActivatedRoute, + private processoService: ProcessoService + ) { } componentName: string = ''; diff --git a/src/app/components/processComponents/process-container/process-container.component.ts b/src/app/components/processComponents/process-container/process-container.component.ts index 8ff22457..e0716466 100644 --- a/src/app/components/processComponents/process-container/process-container.component.ts +++ b/src/app/components/processComponents/process-container/process-container.component.ts @@ -10,19 +10,21 @@ import { ProcessoService } from 'src/app/services/processo.service'; export class ProcessContainerComponent implements OnInit { processos: Processo[] = []; - - constructor(private processoService: ProcessoService) { } + + constructor( + private processoService: ProcessoService, + ) { } ngOnInit(): void { this.processoService.getAllProcess() - .subscribe({ - next: (processos: any) => { - this.processos = processos; - }, - error: (response: any) => { - console.log(response) - } - }) + .subscribe({ + next: (processos: any) => { + this.processos = processos; + }, + error: (response: any) => { + console.log(response) + } + }) } } diff --git a/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.html b/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.html new file mode 100644 index 00000000..5920e38b --- /dev/null +++ b/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.html @@ -0,0 +1,83 @@ + +
  • +
    +

    Nome

    + + +
    + +

    CPF

    + +
    + + +

    RG

    + +
    +
    +
    +
  • + +
  • +
    +

    CEP

    + +
    + +

    Endereço

    + +
    + +

    Número

    + +
    + +
    +
    + +

    Complemento

    + +
    +
    +
    +
  • + +
  • +
    +
    + +

    Cargo

    + +
    + + +

    Ultimo Salário

    + +
    +
    +
    + +

    Data de admissão

    + +
    + + +

    Data de demissão

    + +
    +
    +
    +
  • + \ No newline at end of file diff --git a/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.scss b/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.scss new file mode 100644 index 00000000..d084e62e --- /dev/null +++ b/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.scss @@ -0,0 +1 @@ +@import '../process-create.component.scss' \ No newline at end of file diff --git a/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.spec.ts b/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.spec.ts new file mode 100644 index 00000000..7d4a921e --- /dev/null +++ b/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProcessCreateFisicalPersonComponent } from './process-create-fisical-person.component'; + +describe('ProcessCreateFisicalPersonComponent', () => { + let component: ProcessCreateFisicalPersonComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ProcessCreateFisicalPersonComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ProcessCreateFisicalPersonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.ts b/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.ts new file mode 100644 index 00000000..38334a36 --- /dev/null +++ b/src/app/components/processComponents/process-create/process-create-fisical-person/process-create-fisical-person.component.ts @@ -0,0 +1,31 @@ +import { Component, OnInit } from '@angular/core'; +import { ProcessCreateComponent } from '../process-create.component'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; + +@Component({ + selector: 'app-process-create-fisical-person', + templateUrl: './process-create-fisical-person.component.html', + styleUrls: ['./process-create-fisical-person.component.scss'] +}) +export class ProcessCreateFisicalPersonComponent extends ProcessCreateComponent implements OnInit { + createProcessFisicalPersonForm!: FormGroup; + + + override ngOnInit(): void { + this.createProcessFisicalPersonForm = new FormGroup({ + PARTE_CONTRARIA_NOME: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_CPF: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_RG: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_ENDERECO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_CEP: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_NUMERO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_COMPLEMENTO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_CARGO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_DATA_ADMISSAO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_DATA_DEMISSAO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_ULTIMO_SALARIO: new FormControl('', [Validators.required]) + }); + } + + +} diff --git a/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.html b/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.html new file mode 100644 index 00000000..7f03a7e8 --- /dev/null +++ b/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.html @@ -0,0 +1,81 @@ +
    +
  • +
    +

    Nome

    + + +
    + +

    Nome Fantasia

    + +
    + + +

    CNPJ

    + +
    +
    +
    +
  • +
  • +
    +

    CEP

    + +
    + +

    Endereço

    + +
    + +

    Número

    + +
    + + +

    Complemento

    + +
    +
    +
    +
  • + +
  • +
    +
    + +

    Estado

    + +
    + + +

    Cidade

    + +
    + + +

    Pais

    + +
    +
    + +

    Observação

    + +
    +
    +
  • +
    \ No newline at end of file diff --git a/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.scss b/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.scss new file mode 100644 index 00000000..d084e62e --- /dev/null +++ b/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.scss @@ -0,0 +1 @@ +@import '../process-create.component.scss' \ No newline at end of file diff --git a/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.spec.ts b/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.spec.ts new file mode 100644 index 00000000..42d7d947 --- /dev/null +++ b/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProcessCreateLegalPersonComponent } from './process-create-legal-person.component'; + +describe('ProcessCreateLegalPersonComponent', () => { + let component: ProcessCreateLegalPersonComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ProcessCreateLegalPersonComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ProcessCreateLegalPersonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.ts b/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.ts new file mode 100644 index 00000000..09446b5f --- /dev/null +++ b/src/app/components/processComponents/process-create/process-create-legal-person/process-create-legal-person.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit } from '@angular/core'; +import { ProcessCreateComponent } from '../process-create.component'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; + +@Component({ + selector: 'app-process-create-legal-person', + templateUrl: './process-create-legal-person.component.html', + styleUrls: ['./process-create-legal-person.component.scss'] +}) +export class ProcessCreateLegalPersonComponent extends ProcessCreateComponent implements OnInit { + createProcessLegalPersonForm!: FormGroup; + + override ngOnInit(): void { + this.createProcessLegalPersonForm = new FormGroup({ + + PARTE_CONTRARIA_NOME: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_NOME_FANTASIA: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_ENDERECO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_CEP: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_NUMERO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_COMPLEMENTO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_ESTADO: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_PAIS: new FormControl('', [Validators.required]), + PARTE_CONTRARIA_CIDADE: new FormControl('', [Validators.required]), + }); + } +} diff --git a/src/app/components/processComponents/process-create/process-create.component.html b/src/app/components/processComponents/process-create/process-create.component.html index 41e03088..52510d4a 100644 --- a/src/app/components/processComponents/process-create/process-create.component.html +++ b/src/app/components/processComponents/process-create/process-create.component.html @@ -279,192 +279,33 @@

    Crição de Processo

  • -
    +

    Parte Contrária

    - -
      - - - - - -
      -
    • -
      -

      Nome

      - - -
      - -

      Nome Fantasia

      - -
      - - -

      CNPJ

      - -
      -
      -
      -
    • -
    • -
      -

      CEP

      - -
      - -

      Endereço

      - -
      - -

      Número

      - -
      - - -

      Complemento

      - -
      -
      -
      -
    • - -
    • -
      -
      - -

      Estado

      - -
      - - -

      Cidade

      - -
      - - -

      Pais

      - -
      -
      - -

      Observação

      - -
      -
      -
    • -
      - - - + + + + + + + +
    - +
    \ No newline at end of file diff --git a/src/app/components/processComponents/process-create/process-create.component.scss b/src/app/components/processComponents/process-create/process-create.component.scss index 082c0139..65919b6a 100644 --- a/src/app/components/processComponents/process-create/process-create.component.scss +++ b/src/app/components/processComponents/process-create/process-create.component.scss @@ -70,7 +70,7 @@ select { select { width: auto; - min-width: 250px; + min-width: 200px; } div[class*="--div"] { diff --git a/src/app/components/processComponents/process-create/process-create.component.ts b/src/app/components/processComponents/process-create/process-create.component.ts index 0f73a626..1b117718 100644 --- a/src/app/components/processComponents/process-create/process-create.component.ts +++ b/src/app/components/processComponents/process-create/process-create.component.ts @@ -30,19 +30,6 @@ import { PatronoResponsavelService } from 'src/app/services/patrono-responsavel. styleUrls: ['./process-create.component.scss'] }) export class ProcessCreateComponent implements OnInit { - createProcessForm!: FormGroup; - - ambitos: ProcessoAmbito[] = []; - areasDoDireito: ProcessoAreaDoDireito[] = []; - condicoesTentativaAcordo: ProcessoCondicoesTentativaAcordo[] = []; - fases: ProcessoFase[] = []; - foroTribunalOrgaos: ProcessoForoTribunalOrgao[] = []; - motivosDoEncerramento: ProcessoMotivoDoEncerramento[] = []; - status: ProcessoStatus[] = []; - tiposDeAcoes: ProcessoTipoDeAcao[] = []; - varas: ProcessoVara[] = []; - patronoResponsavel: ProcessoPatronoResponsavel[] = []; - constructor( private router: Router, private ProcessoService: ProcessoService, @@ -58,6 +45,25 @@ export class ProcessCreateComponent implements OnInit { private PatronoResponsavel: PatronoResponsavelService ) { } + createProcessForm!: FormGroup; + + ambitos: ProcessoAmbito[] = []; + areasDoDireito: ProcessoAreaDoDireito[] = []; + condicoesTentativaAcordo: ProcessoCondicoesTentativaAcordo[] = []; + fases: ProcessoFase[] = []; + foroTribunalOrgaos: ProcessoForoTribunalOrgao[] = []; + motivosDoEncerramento: ProcessoMotivoDoEncerramento[] = []; + status: ProcessoStatus[] = []; + tiposDeAcoes: ProcessoTipoDeAcao[] = []; + varas: ProcessoVara[] = []; + patronoResponsavel: ProcessoPatronoResponsavel[] = []; + + componentName: string = ''; + + swapTabs(componentName: string): void { + this.componentName = componentName; + } + createProcessResquest: Processo = { ID_PROCESSO: '', @@ -116,7 +122,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (ambitos: any) => { this.ambitos = ambitos; - console.log(ambitos) }, error: (response: any) => { console.log(response) @@ -128,7 +133,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (areasDoDireito: any) => { this.areasDoDireito = areasDoDireito; - console.log(areasDoDireito) }, error: (response: any) => { console.log(response) @@ -139,7 +143,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (condicoesTentativaAcordo: any) => { this.condicoesTentativaAcordo = condicoesTentativaAcordo; - console.log(condicoesTentativaAcordo) }, error: (response: any) => { console.log(response) @@ -150,7 +153,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (fases: any) => { this.fases = fases; - console.log(fases) }, error: (response: any) => { console.log(response) @@ -161,7 +163,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (foroTribunalOrgaos: any) => { this.foroTribunalOrgaos = foroTribunalOrgaos; - console.log(foroTribunalOrgaos) }, error: (response: any) => { console.log(response) @@ -172,7 +173,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (motivosDoEncerramento: any) => { this.motivosDoEncerramento = motivosDoEncerramento; - console.log(motivosDoEncerramento) }, error: (response: any) => { console.log(response) @@ -183,7 +183,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (status: any) => { this.status = status; - console.log(status) }, error: (response: any) => { console.log(response) @@ -194,7 +193,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (tiposDeAcoes: any) => { this.tiposDeAcoes = tiposDeAcoes; - console.log(tiposDeAcoes) }, error: (response: any) => { console.log(response) @@ -205,7 +203,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (varas: any) => { this.varas = varas; - console.log(varas) }, error: (response: any) => { console.log(response) @@ -216,7 +213,6 @@ export class ProcessCreateComponent implements OnInit { .subscribe({ next: (patronoResponsavel: any) => { this.patronoResponsavel = patronoResponsavel; - console.log(patronoResponsavel) }, error: (response: any) => { console.log(response) @@ -254,23 +250,23 @@ export class ProcessCreateComponent implements OnInit { DATA_ENCERRAMENTO: new FormControl(''), MOTIVO_ENCERRAMENTO: new FormControl(''), MOTIVO_BAIXA_PROVISORIA: new FormControl(''), - PARTE_CONTRARIA_NOME: new FormControl('', [Validators.required]), - PARTE_CONTRARIA_NOME_FANTASIA: new FormControl(''), - PARTE_CONTRARIA_CPF: new FormControl(''), - PARTE_CONTRARIA_CNPJ: new FormControl(''), - PARTE_CONTRARIA_RG: new FormControl(''), - PARTE_CONTRARIA_ENDERECO: new FormControl('', [Validators.required]), - PARTE_CONTRARIA_CEP: new FormControl('', [Validators.required]), - PARTE_CONTRARIA_NUMERO: new FormControl('', [Validators.required]), - PARTE_CONTRARIA_COMPLEMENTO: new FormControl('', [Validators.required]), - PARTE_CONTRARIA_ESTADO: new FormControl('', [Validators.required]), - PARTE_CONTRARIA_PAIS: new FormControl('', [Validators.required]), - PARTE_CONTRARIA_OBSERVACAO: new FormControl(''), - PARTE_CONTRARIA_CIDADE: new FormControl('', [Validators.required]), - PARTE_CONTRARIA_CARGO: new FormControl(''), - PARTE_CONTRARIA_DATA_ADMISSAO: new FormControl(''), - PARTE_CONTRARIA_DATA_DEMISSAO: new FormControl(''), - PARTE_CONTRARIA_ULTIMO_SALARIO: new FormControl('') + // PARTE_CONTRARIA_NOME: new FormControl('', [Validators.required]), + // PARTE_CONTRARIA_NOME_FANTASIA: new FormControl(''), + // PARTE_CONTRARIA_CPF: new FormControl(''), + // PARTE_CONTRARIA_CNPJ: new FormControl(''), + // PARTE_CONTRARIA_RG: new FormControl(''), + // PARTE_CONTRARIA_ENDERECO: new FormControl('', [Validators.required]), + // PARTE_CONTRARIA_CEP: new FormControl('', [Validators.required]), + // PARTE_CONTRARIA_NUMERO: new FormControl('', [Validators.required]), + // PARTE_CONTRARIA_COMPLEMENTO: new FormControl('', [Validators.required]), + // PARTE_CONTRARIA_ESTADO: new FormControl('', [Validators.required]), + // PARTE_CONTRARIA_PAIS: new FormControl('', [Validators.required]), + // PARTE_CONTRARIA_OBSERVACAO: new FormControl(''), + // PARTE_CONTRARIA_CIDADE: new FormControl('', [Validators.required]), + // PARTE_CONTRARIA_CARGO: new FormControl(''), + // PARTE_CONTRARIA_DATA_ADMISSAO: new FormControl(''), + // PARTE_CONTRARIA_DATA_DEMISSAO: new FormControl(''), + // PARTE_CONTRARIA_ULTIMO_SALARIO: new FormControl('') }); } diff --git a/src/app/components/processComponents/process-searchbar/process-searchbar.component.html b/src/app/components/processComponents/process-searchbar/process-searchbar.component.html index fafd80e3..c96c7e0f 100644 --- a/src/app/components/processComponents/process-searchbar/process-searchbar.component.html +++ b/src/app/components/processComponents/process-searchbar/process-searchbar.component.html @@ -8,82 +8,87 @@

    Painel de Processos

  • { + let service: AcordoService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(AcordoService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/services/acordo.service.ts b/src/app/services/acordo.service.ts new file mode 100644 index 00000000..4a524c0e --- /dev/null +++ b/src/app/services/acordo.service.ts @@ -0,0 +1,43 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { environment } from 'src/environments/environment.development'; +import { Observable } from 'rxjs'; +import { ProcessoAcordo } from '../models/PROCESSO_ACORDO.model'; + +@Injectable({ + providedIn: 'root' +}) +export class AcordoService { + + baseApiUrl: string = environment.baseApiUrl; + + constructor(private http: HttpClient) { } + + getAllAcordo(): Observable { + return this.http.get(this.baseApiUrl + '/api/Sistema/acordo'); + } + + getProcessoAcordo(id_acordo: string): Observable { + return this.http.get(this.baseApiUrl + '/api/Sistema/processo/acordo/' + id_acordo) + } + + getAllProcessoAcordo(id_processo: string): Observable { + return this.http.get(this.baseApiUrl + '/api/Sistema/processo/all/acordo/' + id_processo); + } + + createAcordo(createAcordoRequest: ProcessoAcordo, id_processo: String): Observable { + delete createAcordoRequest.ID; + createAcordoRequest.ID_PROCESSO = id_processo; + createAcordoRequest.CRIADOR_ACORDO = "Usuario" + return this.http.post(this.baseApiUrl + '/api/Sistema/add-acordo', createAcordoRequest); + } + + updateAcordo(id_acordo: string, updateAcordoRequest: ProcessoAcordo): Observable { + updateAcordoRequest.ID = id_acordo; + return this.http.put(this.baseApiUrl + '/api/Sistema/update-acordo/' + id_acordo, updateAcordoRequest); + } + + // deleteAcordo(id: string): Observable { + // return this.http.delete(this.baseApiUrl + '/api/Sistema/delete-acordo/' + id); + // } +} diff --git a/src/app/services/andamento.service.spec.ts b/src/app/services/andamento.service.spec.ts new file mode 100644 index 00000000..b0c2d6b3 --- /dev/null +++ b/src/app/services/andamento.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { AndamentoService } from './andamento.service'; + +describe('AndamentoService', () => { + let service: AndamentoService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(AndamentoService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/services/andamento.service.ts b/src/app/services/andamento.service.ts new file mode 100644 index 00000000..6fde08d2 --- /dev/null +++ b/src/app/services/andamento.service.ts @@ -0,0 +1,43 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { environment } from 'src/environments/environment.development'; +import { Observable } from 'rxjs'; +import { ProcessoAndamento } from '../models/PROCESSO_ANDAMENTO.model'; + +@Injectable({ + providedIn: 'root' +}) +export class AndamentoService { + + baseApiUrl: string = environment.baseApiUrl; + + constructor(private http: HttpClient) { } + + getAllAndamento(): Observable { + return this.http.get(this.baseApiUrl + '/api/Sistema/andamento'); + } + + getProcessoAndamento(id_andamento: string): Observable { + return this.http.get(this.baseApiUrl + '/api/Sistema/processo/andamento/' + id_andamento); + } + + getAllProcessoAndamento(id_processo: string): Observable { + return this.http.get(this.baseApiUrl + '/api/Sistema/processo/all/andamento/' + id_processo); + } + + createAndamento(createAndamentoRequest: ProcessoAndamento, id_processo: String): Observable { + delete createAndamentoRequest.ID; + createAndamentoRequest.ID_PROCESSO = id_processo; + createAndamentoRequest.CRIADOR_ANDAMENTO = "Usuario"; + return this.http.post(this.baseApiUrl + '/api/Sistema/add-andamento', createAndamentoRequest); + } + + updateAndamento(id_andamento: string, updateAndamentoRequest: ProcessoAndamento): Observable { + updateAndamentoRequest.ID = id_andamento; + return this.http.put(this.baseApiUrl + '/api/Sistema/update-andamento/' + id_andamento, updateAndamentoRequest); + } + + // deleteAndamento(id: string): Observable { + // return this.http.delete(this.baseApiUrl + '/api/Sistema/delete-andamento/' + id); + // } +} diff --git a/src/app/services/fase.service.ts b/src/app/services/fase.service.ts index 6a361cb7..c1e326aa 100644 --- a/src/app/services/fase.service.ts +++ b/src/app/services/fase.service.ts @@ -17,17 +17,17 @@ export class FaseService { return this.http.get(this.baseApiUrl + '/api/Sistema/fase'); } - createFase(createFaseRequest: ProcessoFase): Observable { - delete createFaseRequest.ID; - return this.http.post(this.baseApiUrl + '/api/Sistema/add-fase', createFaseRequest); - } + // createFase(createFaseRequest: ProcessoFase): Observable { + // delete createFaseRequest.ID; + // return this.http.post(this.baseApiUrl + '/api/Sistema/add-fase', createFaseRequest); + // } - updateFase(id: string, updateFaseRequest: ProcessoFase): Observable { - updateFaseRequest.ID = id; - return this.http.put(this.baseApiUrl + '/api/Sistema/update-fase/' + id, updateFaseRequest); - } + // updateFase(id: string, updateFaseRequest: ProcessoFase): Observable { + // updateFaseRequest.ID = id; + // return this.http.put(this.baseApiUrl + '/api/Sistema/update-fase/' + id, updateFaseRequest); + // } - deleteFase(id: string): Observable { - return this.http.delete(this.baseApiUrl + '/api/Sistema/delete-fase/' + id); - } + // deleteFase(id: string): Observable { + // return this.http.delete(this.baseApiUrl + '/api/Sistema/delete-fase/' + id); + // } } diff --git a/src/app/services/patrono-responsavel.service.ts b/src/app/services/patrono-responsavel.service.ts index 775b62b9..19e089e4 100644 --- a/src/app/services/patrono-responsavel.service.ts +++ b/src/app/services/patrono-responsavel.service.ts @@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { environment } from 'src/environments/environment.development'; import { Observable } from 'rxjs'; -import { ProcessoPatronoResponsavel } from '../models/PROCESSO_PATRONORESPONSAVEL.model'; +import { ProcessoPatronoResponsavel } from '../models/PROCESSO_PATRONO_RESPONSAVEL.model'; @Injectable({ providedIn: 'root' @@ -19,6 +19,8 @@ export class PatronoResponsavelService { createPatronoResponsavel(createPatronoResponsavelRequest: ProcessoPatronoResponsavel): Observable { delete createPatronoResponsavelRequest.ID; + // console.log(createPatronoResponsavelRequest.PATRONO_RESPONSAVEL_CPF_CNPJ.replaceAll("-","")) + // createPatronoResponsavelRequest.PATRONO_RESPONSAVEL_CPF_CNPJ = createPatronoResponsavelRequest.PATRONO_RESPONSAVEL_CPF_CNPJ.replaceAll("",""); return this.http.post(this.baseApiUrl + '/api/Sistema/add-patrono-responsavel', createPatronoResponsavelRequest); } diff --git a/src/app/services/status.service.ts b/src/app/services/status.service.ts index 102d5680..5530b6b6 100644 --- a/src/app/services/status.service.ts +++ b/src/app/services/status.service.ts @@ -14,6 +14,6 @@ export class StatusService { constructor(private http: HttpClient) { } getAllStatus(): Observable { - return this.http.get(this.baseApiUrl + '/api/Sistema/ambito') + return this.http.get(this.baseApiUrl + '/api/Sistema/status') } } diff --git a/src/app/services/tipo-de-andamento.service.spec.ts b/src/app/services/tipo-de-andamento.service.spec.ts new file mode 100644 index 00000000..5c2d5aa5 --- /dev/null +++ b/src/app/services/tipo-de-andamento.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { TipoDeAndamentoService } from './tipo-de-andamento.service'; + +describe('TipoDeAndamentoService', () => { + let service: TipoDeAndamentoService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(TipoDeAndamentoService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/services/tipo-de-andamento.service.ts b/src/app/services/tipo-de-andamento.service.ts new file mode 100644 index 00000000..113c9ace --- /dev/null +++ b/src/app/services/tipo-de-andamento.service.ts @@ -0,0 +1,34 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { environment } from 'src/environments/environment.development'; +import { Observable } from 'rxjs'; +import { ProcessoTipoDeAndamento } from '../models/PROCESSO_TIPO_DE_ANDAMENTO.model'; + +@Injectable({ + providedIn: 'root' +}) +export class TipoDeAndamentoService { + + baseApiUrl: string = environment.baseApiUrl; + + constructor(private http: HttpClient) { } + + getAllTipoDeAndamento(): Observable { + return this.http.get(this.baseApiUrl + '/api/Sistema/tipo-de-andamento') + } + + createTipoDeAndamento(createTipoDeAndamentoRequest: ProcessoTipoDeAndamento): Observable { + delete createTipoDeAndamentoRequest.ID; + return this.http.post(this.baseApiUrl + '/api/Sistema/add-tipo-de-andamento', createTipoDeAndamentoRequest); + } + + updateTipoDeAndamento(id: String, updateTipoDeAndamentoRequest: ProcessoTipoDeAndamento): Observable { + updateTipoDeAndamentoRequest.ID = id; + return this.http.put(this.baseApiUrl + '/api/Sistema/update-tipo-de-andamento/' + id, updateTipoDeAndamentoRequest) + + } + + deleteTipoDeAndamento(id: String): Observable { + return this.http.delete(this.baseApiUrl + '/api/Sistema/delete-tipo-de-andamento/' + id) + } +} diff --git a/src/styles.scss b/src/styles.scss index 5037500d..9daef610 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -76,6 +76,14 @@ tbody tr { } } +.mat-mdc-dialog-surface { + overflow: hidden !important; +} + +.mdc-dialog__surface { + overflow: hidden !important; +} + .input { height: 35px; padding: 0 15px;