cambios finales de cierre

parent 65f34774
export class seguim {
uzytavseguim_id?: number;
uzytavproyec_id?: number;
uzytavseguim_descrip?: string;
uzytavobjetivo_programa_id?: number;
uzytavseguim_fecha_logro?: Date;
uzytavseguim_logro?: string;
}
...@@ -210,6 +210,16 @@ import { ListarActaConsejoDepartamentoComponent } from './pages/Proyectos/Acta d ...@@ -210,6 +210,16 @@ import { ListarActaConsejoDepartamentoComponent } from './pages/Proyectos/Acta d
import { PdfComponent } from './pages/Proyectos/pdf/pdf.component'; import { PdfComponent } from './pages/Proyectos/pdf/pdf.component';
import { ListObjetivosEjecComponent } from './pages/Proyectos/Cierre/objetivos ejecutados/list-objetivos-ejec/list-objetivos-ejec.component'; import { ListObjetivosEjecComponent } from './pages/Proyectos/Cierre/objetivos ejecutados/list-objetivos-ejec/list-objetivos-ejec.component';
import { EditObjetivosEjecComponent } from './pages/Proyectos/Cierre/objetivos ejecutados/edit-objetivos-ejec/edit-objetivos-ejec.component'; import { EditObjetivosEjecComponent } from './pages/Proyectos/Cierre/objetivos ejecutados/edit-objetivos-ejec/edit-objetivos-ejec.component';
import { ListInformeComponent } from './pages/Proyectos/Ejecución/informes de avance/list-informe/list-informe.component';
import { EditInformeComponent } from './pages/Proyectos/Ejecución/informes de avance/edit-informe/edit-informe.component';
import { ListEntidadComponent } from './pages/Proyectos/Presupuesto Detallado/list-entidad/list-entidad.component';
import { ListComunidadComponent } from './pages/Proyectos/Presupuesto Detallado/list-comunidad/list-comunidad.component';
import { AporteComEjecComponent } from './pages/Proyectos/Cierre/presupuesto ejecutado/aporte-com-ejec/aporte-com-ejec.component';
import { AporteEntEjecComponent } from './pages/Proyectos/Cierre/presupuesto ejecutado/aporte-ent-ejec/aporte-ent-ejec.component';
import { AporteUniEjecComponent } from './pages/Proyectos/Cierre/presupuesto ejecutado/aporte-uni-ejec/aporte-uni-ejec.component';
import { ErrorTextoComponent } from './pages/Proyectos/errores/error-texto/error-texto.component';
import { seguim } from './Models/hito';
import { ComisionAsigComponent } from './pages/asignar comision/comision-asig/comision-asig.component';
@NgModule({ @NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [ declarations: [
...@@ -373,6 +383,15 @@ import { EditObjetivosEjecComponent } from './pages/Proyectos/Cierre/objetivos e ...@@ -373,6 +383,15 @@ import { EditObjetivosEjecComponent } from './pages/Proyectos/Cierre/objetivos e
PdfComponent, PdfComponent,
ListObjetivosEjecComponent, ListObjetivosEjecComponent,
EditObjetivosEjecComponent, EditObjetivosEjecComponent,
ListInformeComponent,
EditInformeComponent,
ListEntidadComponent,
ListComunidadComponent,
AporteComEjecComponent,
AporteEntEjecComponent,
AporteUniEjecComponent,
ErrorTextoComponent,
ComisionAsigComponent
], ],
imports: [ imports: [
MatTreeModule, MatTreeModule,
...@@ -407,6 +426,7 @@ import { EditObjetivosEjecComponent } from './pages/Proyectos/Cierre/objetivos e ...@@ -407,6 +426,7 @@ import { EditObjetivosEjecComponent } from './pages/Proyectos/Cierre/objetivos e
MatRadioModule MatRadioModule
], ],
providers: [ providers: [
seguim,
instproy, instproy,
objetivoprograma, objetivoprograma,
proObjeEstra, proObjeEstra,
......
.principal {
text-align: center;
margin-bottom: 2%;
}
.grid-container {
display: grid;
grid-template-columns: 5% 10% 45% 10% 5% 10% 15%;
border: 1px solid #ccc;
}
.titulo{
text-align: center;
margin: 3px;
font-weight: bold;
}
#cabecera {
background: linear-gradient(135deg,
var(--background-base) 22px,
var(--background-hover) 22px,
var(--background-hover) 24px,
transparent 24px,
transparent 67px,
var(--background-hover) 67px,
var(--background-hover) 69px,
transparent 69px),
linear-gradient(225deg,
var(--background-base) 22px,
var(--background-hover) 22px,
var(--background-hover) 24px,
transparent 24px,
transparent 67px,
var(--background-hover) 67px,
var(--background-hover) 69px,
transparent 69px) 0 64px;
background-color: var(--background-base);
background-size: 64px 128px;
}
.Column {
padding-left: 0px;
padding-right: 0px;
width: 100px;
white-space: inherit;
/* overflow: visible;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; */
}
.Column1 {
padding-left: 0px;
padding-right: 0px;
width: 10px;
white-space: normal;
overflow: visible;
}
.Column2 {
width: 25px;
padding-left: 0px;
padding-right: 0px;
}
.volver{
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
border-radius: 50%;
background-color: white;
display: flex;
color: rgb(71, 127, 75);
align-items: center;
justify-content: center;
padding: 0;
width: 32px;
height: 32px;
border: none;
outline: none;
cursor: pointer;
}
.grid-item {
font-weight: bold;
}
.grid-opciones {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.titulo {
display: flex;
align-items: center;
justify-content: center;
}
.titulo-texto {
font-weight: bold;
font-size: 18px;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
margin-right: 10px;
}
.componente {
justify-content: center;
align-items: center;
}
.card {
background-color: rgb(252, 252, 251)
}
.colorEditar {
color: blue;
}
.colorEditar svg {
fill: blue;
}
.contenedorP {
width: 96%;
margin-left: 2%;
margin-right: 2%;
margin: 10px auto;
border-radius: 10px;
text-align: center;
margin-top: 10%;
background-color: white;
}
.contenedor:not(:last-child) {
margin-bottom: 2px;
}
.separador{
margin-top: 5%;
}
.contenedor {
width: 96%;
margin-left: 2%;
margin-right: 2%;
padding-bottom: 2%;
border-radius: 10px;
background-color: white;
position: relative;
z-index: 1;
}
.sobremontado {
position: relative;
align-items: center;
justify-content: center;
padding: 10px;
width: 96%;
top: -20px;
left: 2%;
background-color: rgb(71, 127, 75);
color: #fff;
text-align: center;
padding: 10px;
box-sizing: border-box;
margin-bottom: -50px;
z-index: 2;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.sobremontado span {
display: flex;
align-items: center;
justify-content: center;
margin: 0;
}
.sobremontado mat-icon {
margin-right: 5px;
}
.icono-instituciones {
display: flex;
align-items: center;
justify-content: center;
margin-right: 5px;
font-size: 20px;
cursor: pointer;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
font-family: 'Roboto', sans-serif;
color: #333;
}
table th,
table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e0e0e0;
}
table th {
background-color: rgb(248, 249, 250);
font-weight: bold;
text-transform: uppercase;
}
table td {
position: relative;
}
table td::after {
content: "";
position: absolute;
bottom: -1px;
left: 0;
width: 100%;
height: 1px;
background-color: #e0e0e0;
}
input[type="text"] {
width: 200px;
padding: 8px;
border: 1px solid #ccc;
border-radius: 5px;
margin-left: 10px;
}
.area-busqueda {
padding: 20px;
margin-top: 30px;
text-align: right;
}
@media (max-width: 600px) {
table {
font-size: 14px;
}
table th,
table td {
padding: 8px;
}
}
.btn-observar {
border-radius: 50%;
width: 36px;
height: 36px;
}
.colorsito{
background-color: rgb(248, 249, 250);
}
.rounder{
border-radius: 50%;
background-color: rgb(71, 127, 75);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
width: 15%;
height: 40px;
border: none;
outline: none;
cursor: pointer;
}
.rounder mat-icon {
font-size: 24px;
color: #fff;
}
@media (max-width: 768px) {
.rounder {
width: 30%;
}
}
@media (max-width: 480px) {
.rounder {
width: 40%;
}
}
.margen{
margin: 10px;
padding: 10px;
margin-bottom: 10px;
}
.bordes {
border-collapse: collapse;
width: 100%;
}
.bordes th,
.bordes td {
border: 1px solid black;
padding: 8px;
}
.bordes th {
background-color: #f5f5f5;
font-weight: bold;
}
.bordes td {
background-color: #ffffff;
}
.bordes tr:nth-child(even) {
background-color: #f9f9f9;
}
.bordes tr:hover {
background-color: #eaeaea;
}
.bordes th:last-child,
.bordes td:last-child {
border-bottom: none;
}
.rounder-nuevo {
border-radius: 50%;
background-color: rgb(71, 127, 75);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
width: 36px;
height: 36px;
border: none;
outline: none;
cursor: pointer;
margin-left: 5px;
}
.white-icon {
color: white;
}
.btn{
padding: 0 2% 0 2%;
}
.azul {
color: blue;
}
.institution {
display: flex;
align-items: center;
}
.institution-name {
font-size: 20px;
/* Tamaño de fuente deseado */
font-weight: bold;
/* Opcional, para hacerlo más destacado */
margin-right: 30px;
/* Espacio entre el icono y el nombre */
}
.formulario {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
max-width: 96%;
margin: 0 auto;
background-color: white;
}
/* Estilos para la columna izquierda */
.columna {
display: flex;
justify-content: center; /* Center content horizontally */
align-items: center; /* Center content vertically */
padding-right: 2%;
text-align: center;
}
.form-field {
width: 100%;
}
.container{
margin: 10px;
}
.input-container {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-left: 2%; /* Center content horizontally within the input container */
}
.add-icon {
display: flex;
align-items: center;
justify-content: center;
width: 25px;
height: 25px;
border-radius: 50%;
background-color: white;
color: black;
font-size: 25px;
}
\ No newline at end of file
<form [formGroup]="dynamicForm" (ngSubmit)="guardarCambios()">
<div class="container">
<div class="save-button">
<button mat-raised-button color="primary" *ngIf="!cambio" (click)="cambiar()">Editar</button>
<button mat-raised-button color="primary" *ngIf="cambio">Guardar</button>
<span class="separator"></span>
<button mat-raised-button color="warn" *ngIf="cambio" (click)="cancelado()">Cancelar</button>
</div>
<mat-label class="titulo">Aporte de la Comunidad Beneficiaria</mat-label>
<div class="mat-elevation-z8">
<table mat-table [dataSource]="dataSource" matSort>
<!-- Nro Column -->
<ng-container matColumnDef="Nro" class="Column1">
<th class="Column1 negrita" mat-header-cell *matHeaderCellDef mat-sort-header> Nro </th>
<td class="Column1" mat-cell *matCellDef="let i = index"> {{ i+1 }}
</td>
</ng-container>
<ng-container matColumnDef="bien" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Bien y/o Servicio</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{dato.uzytavpresup_bien_servicio}}
</td>
</ng-container>
<ng-container matColumnDef="descripcion" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Descripción</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{dato.uzytavpresup_esptecnic}}
</td>
</ng-container>
<ng-container matColumnDef="total" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Valor Planificado USD
</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{ (dato.uzytavpresup_valor * dato.uzytavpresup_cantidad) | number:'1.2-2' }}
</td>
</ng-container>
<ng-container matColumnDef="totalEjecutado" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Valor Ejecutado USD
</th>
<td class="Column" mat-cell *matCellDef="let dato; let i = index">
<input matInput type="number" [formControlName]="'totalEjecCom_' + dato.uzytavpresup_id"
required min="0" pattern="[0-9]+">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<div class="columna">
<div class="input-container" style="font-weight: bold; color:black;">
<mat-form-field class="form-field" style="font-weight: bold;">
<mat-label>Total Planificado </mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalSuma">
</mat-form-field>
</div>
</div>
<div class="columna">
<div class="input-container" style="font-weight: bold; color:black;">
<mat-form-field class="form-field" style="font-weight: bold;">
<mat-label>Total Ejecutado </mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalSumaEjecutado">
</mat-form-field>
</div>
</div>
</div>
</div>
</form>
\ No newline at end of file
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { AporteComEjecComponent } from './aporte-com-ejec.component';
describe('AporteComEjecComponent', () => {
let component: AporteComEjecComponent;
let fixture: ComponentFixture<AporteComEjecComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AporteComEjecComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AporteComEjecComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { MatTable, MatTableDataSource } from '@angular/material/table';
import { CatalogoPP } from 'src/app/modules/main/Models/catalogo-partidas-presupuestarias';
import { PartidasPresupuestarias } from 'src/app/modules/main/Models/partidas-presupuestarias';
import { PresupuestoPartidas } from 'src/app/modules/main/Models/presupuesto-partidas';
import { Actualiza_datosService } from 'src/app/modules/main/services/actualiza_datos/actualiza_datos.service';
import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service';
import { EnvioFormularioComponent } from '../../../../programa/opciones/envio-formulario/envio-formulario.component';
import { PresupuestoPartidasService } from 'src/app/modules/main/services/presupuesto-partidas/presupuesto-partidas.service';
@Component({
selector: 'app-aporte-com-ejec',
templateUrl: './aporte-com-ejec.component.html',
styleUrls: ['./aporte-com-ejec.component.css']
})
export class AporteComEjecComponent implements OnInit {
idRecuperado: number;
totalSuma: number = 0;
//Para Mostrar la información
dataSource: MatTableDataSource<PresupuestoPartidas>;
claPre: PartidasPresupuestarias;
partida!: CatalogoPP[];
nombrePartida: string;
formularioEnviado: boolean;
@Output() formularioGuardado = new EventEmitter<void>();
cambio: boolean = false;
dynamicForm: FormGroup; // Declare a FormGroup
presupuesto: PresupuestoPartidas;
totalSumaEjecutado: number = 0;
politicas: any[] = [];
objetivos: any[] = [];
presupuestoPartidas!: PresupuestoPartidas[];
displayedColumns: string[] = [
'Nro',
'bien',
'descripcion',
'total',
'totalEjecutado'
];
@ViewChild(MatTable) table: MatTable<any>;
constructor(
private presupuestoPartidasService: PresupuestoPartidasService,
private id_Compartido: Compartir_idService,
private dialog: MatDialog,
private formBuilder: FormBuilder,
private datosCompartidos: Actualiza_datosService,
) {
this.claPre = new PartidasPresupuestarias();
this.dataSource = new MatTableDataSource<PresupuestoPartidas>([]);
this.presupuesto = new PresupuestoPartidas()
}
ngOnInit(): void {
this.initializeForm()
this.idRecuperado = parseInt(localStorage.getItem('proyectoId'),10);
this.datosCompartidos.datos$.subscribe(() => {
this.obtenerRegistros();
});
this.presupuestoPartidasService.parametrosActualizados.subscribe(() => {
this.obtenerRegistros();
});
}
initializeForm() {
this.dynamicForm = this.formBuilder.group({});
this.dynamicForm.disable(); // Disable all form controls
}
guardarCambios() {
// Iterate through the array and save the changes
this.presupuestoPartidas.forEach(partida => {
const controlName = 'totalEjecCom_' + partida.uzytavpresup_id;
const value = this.dynamicForm.get(controlName).value;
console.log("valor recuperado xxxx ", value)
this.presupuesto.uzytavpresup_total_ejec = value;
// Send the updated data to the API for this record
this.presupuestoPartidasService.modificarParametros(partida.uzytavpresup_id, this.presupuesto).subscribe(
(response) => {
console.log('Cambios guardados exitosamente para la partida', partida.uzytavpresup_id);
//this.openModal();
this.dynamicForm.disable()
this.cambio = false; // Disable editing mode
this.obtenerRegistros()
},
(error) => {
console.log('Error al guardar los cambios para la partida', partida.uzytavpresup_id, error);
}
);
});
}
openModal() {
const dialogRef = this.dialog.open(EnvioFormularioComponent, {
disableClose: true
});
dialogRef.afterClosed().subscribe(result => {
console.log('La ventana modal se ha cerrado');
this.formularioEnviado = true;
});
}
getSubgrupo3(item: any): string {
return (
item.uzytclasificador_presup_id +
'. ' +
(item.uzytclasificador_presup_nombre || '')
);
}
createDynamicFormControls(partida: PresupuestoPartidas) {
this.dynamicForm.addControl('totalEjecCom_' + partida.uzytavpresup_id,
this.formBuilder.control({ value : partida.uzytavpresup_total_ejec,disabled: true },
[Validators.required, Validators.min(0), Validators.pattern('[0-9]+')]));
this.dynamicForm.disable();
}
obtenerRegistros() {
if (this.idRecuperado !== undefined) {
this.presupuestoPartidasService.obtenerRegistrosRelacionadosComunidadProyecto(this.idRecuperado).subscribe(data => {
if (data !== undefined) {
this.presupuestoPartidas = data.map(partida => {
// Create dynamic form control
this.createDynamicFormControls(partida);
return partida
});
this.dataSource.data = this.presupuestoPartidas;
// Calcular los totales
this.calcularTotales();
this.calcularTotalesEjecutados()
}
});
}
}
calcularTotales() {
this.totalSuma = this.presupuestoPartidas.reduce((total, dato) => {
return total + dato.uzytavpresup_valor * dato.uzytavpresup_cantidad;
}, 0);
this.totalSuma = parseFloat(this.totalSuma.toFixed(2));
}
calcularTotalesEjecutados() {
this.totalSumaEjecutado = this.presupuestoPartidas.reduce((total, dato) => {
return total + dato.uzytavpresup_total_ejec;
}, 0);
this.totalSumaEjecutado = parseFloat(this.totalSumaEjecutado.toFixed(2));
}
cambiar() {
this.cambio = true;
this.dynamicForm.enable();
}
cancelado() {
this.cambio = false;
this.dynamicForm.disable();
}
guardar() {
this.cambio = false;
this.dynamicForm.disable();
}
}
.principal {
text-align: center;
margin-bottom: 2%;
}
.grid-container {
display: grid;
grid-template-columns: 5% 10% 45% 10% 5% 10% 15%;
border: 1px solid #ccc;
}
.titulo{
text-align: center;
margin: 3px;
font-weight: bold;
}
#cabecera {
background: linear-gradient(135deg,
var(--background-base) 22px,
var(--background-hover) 22px,
var(--background-hover) 24px,
transparent 24px,
transparent 67px,
var(--background-hover) 67px,
var(--background-hover) 69px,
transparent 69px),
linear-gradient(225deg,
var(--background-base) 22px,
var(--background-hover) 22px,
var(--background-hover) 24px,
transparent 24px,
transparent 67px,
var(--background-hover) 67px,
var(--background-hover) 69px,
transparent 69px) 0 64px;
background-color: var(--background-base);
background-size: 64px 128px;
}
.Column {
padding-left: 0px;
padding-right: 0px;
width: 100px;
white-space: inherit;
/* overflow: visible;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; */
}
.Column1 {
padding-left: 0px;
padding-right: 0px;
width: 10px;
white-space: normal;
overflow: visible;
}
.Column2 {
width: 25px;
padding-left: 0px;
padding-right: 0px;
}
.volver{
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
border-radius: 50%;
background-color: white;
display: flex;
color: rgb(71, 127, 75);
align-items: center;
justify-content: center;
padding: 0;
width: 32px;
height: 32px;
border: none;
outline: none;
cursor: pointer;
}
.grid-item {
font-weight: bold;
}
.grid-opciones {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.titulo {
display: flex;
align-items: center;
justify-content: center;
}
.titulo-texto {
font-weight: bold;
font-size: 18px;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
margin-right: 10px;
}
.componente {
justify-content: center;
align-items: center;
}
.card {
background-color: rgb(252, 252, 251)
}
.colorEditar {
color: blue;
}
.colorEditar svg {
fill: blue;
}
.contenedorP {
width: 96%;
margin-left: 2%;
margin-right: 2%;
margin: 10px auto;
border-radius: 10px;
text-align: center;
margin-top: 10%;
background-color: white;
}
.contenedor:not(:last-child) {
margin-bottom: 2px;
}
.separador{
margin-top: 5%;
}
.contenedor {
width: 96%;
margin-left: 2%;
margin-right: 2%;
padding-bottom: 2%;
border-radius: 10px;
background-color: white;
position: relative;
z-index: 1;
}
.sobremontado {
position: relative;
align-items: center;
justify-content: center;
padding: 10px;
width: 96%;
top: -20px;
left: 2%;
background-color: rgb(71, 127, 75);
color: #fff;
text-align: center;
padding: 10px;
box-sizing: border-box;
margin-bottom: -50px;
z-index: 2;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.sobremontado span {
display: flex;
align-items: center;
justify-content: center;
margin: 0;
}
.sobremontado mat-icon {
margin-right: 5px;
}
.icono-instituciones {
display: flex;
align-items: center;
justify-content: center;
margin-right: 5px;
font-size: 20px;
cursor: pointer;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
font-family: 'Roboto', sans-serif;
color: #333;
}
table th,
table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e0e0e0;
}
table th {
background-color: rgb(248, 249, 250);
font-weight: bold;
text-transform: uppercase;
}
table td {
position: relative;
}
table td::after {
content: "";
position: absolute;
bottom: -1px;
left: 0;
width: 100%;
height: 1px;
background-color: #e0e0e0;
}
input[type="text"] {
width: 200px;
padding: 8px;
border: 1px solid #ccc;
border-radius: 5px;
margin-left: 10px;
}
.area-busqueda {
padding: 20px;
margin-top: 30px;
text-align: right;
}
@media (max-width: 600px) {
table {
font-size: 14px;
}
table th,
table td {
padding: 8px;
}
}
.btn-observar {
border-radius: 50%;
width: 36px;
height: 36px;
}
.colorsito{
background-color: rgb(248, 249, 250);
}
.rounder{
border-radius: 50%;
background-color: rgb(71, 127, 75);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
width: 15%;
height: 40px;
border: none;
outline: none;
cursor: pointer;
}
.rounder mat-icon {
font-size: 24px;
color: #fff;
}
@media (max-width: 768px) {
.rounder {
width: 30%;
}
}
@media (max-width: 480px) {
.rounder {
width: 40%;
}
}
.margen{
margin: 10px;
padding: 10px;
margin-bottom: 10px;
}
.bordes {
border-collapse: collapse;
width: 100%;
}
.bordes th,
.bordes td {
border: 1px solid black;
padding: 8px;
}
.bordes th {
background-color: #f5f5f5;
font-weight: bold;
}
.bordes td {
background-color: #ffffff;
}
.bordes tr:nth-child(even) {
background-color: #f9f9f9;
}
.bordes tr:hover {
background-color: #eaeaea;
}
.bordes th:last-child,
.bordes td:last-child {
border-bottom: none;
}
.rounder-nuevo {
border-radius: 50%;
background-color: rgb(71, 127, 75);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
width: 36px;
height: 36px;
border: none;
outline: none;
cursor: pointer;
margin-left: 5px;
}
.white-icon {
color: white;
}
.btn{
padding: 0 2% 0 2%;
}
.azul {
color: blue;
}
.institution {
display: flex;
align-items: center;
}
.institution-name {
font-size: 20px;
/* Tamaño de fuente deseado */
font-weight: bold;
/* Opcional, para hacerlo más destacado */
margin-right: 30px;
/* Espacio entre el icono y el nombre */
}
.formulario {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
max-width: 96%;
margin: 0 auto;
background-color: white;
}
/* Estilos para la columna izquierda */
.columna {
display: flex;
justify-content: center; /* Center content horizontally */
align-items: center; /* Center content vertically */
padding-right: 2%;
text-align: center;
}
.form-field {
width: 100%;
}
.container{
margin: 10px;
}
.input-container {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-left: 2%; /* Center content horizontally within the input container */
}
.add-icon {
display: flex;
align-items: center;
justify-content: center;
width: 25px;
height: 25px;
border-radius: 50%;
background-color: white;
color: black;
font-size: 25px;
}
\ No newline at end of file
<form [formGroup]="dynamicForm" (ngSubmit)="guardarCambios()">
<div class="container">
<div class="save-button">
<button mat-raised-button color="primary" *ngIf="!cambio" (click)="cambiar()">Editar</button>
<button mat-raised-button color="primary" *ngIf="cambio">Guardar</button>
<span class="separator"></span>
<button mat-raised-button color="warn" *ngIf="cambio" (click)="cancelado()">Cancelar</button>
</div>
<mat-label class="titulo">Aporte de la Comunidad Beneficiaria</mat-label>
<div class="mat-elevation-z8">
<table mat-table [dataSource]="dataSource" matSort>
<!-- Nro Column -->
<ng-container matColumnDef="Nro" class="Column1">
<th class="Column1 negrita" mat-header-cell *matHeaderCellDef mat-sort-header> Nro </th>
<td class="Column1" mat-cell *matCellDef="let i = index"> {{ i+1 }}
</td>
</ng-container>
<ng-container matColumnDef="bien" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Bien y/o Servicio</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{dato.uzytavpresup_bien_servicio}}
</td>
</ng-container>
<ng-container matColumnDef="descripcion" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Descripción</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{dato.uzytavpresup_esptecnic}}
</td>
</ng-container>
<ng-container matColumnDef="total" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Valor Planificado USD
</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{ (dato.uzytavpresup_valor * dato.uzytavpresup_cantidad) | number:'1.2-2' }}
</td>
</ng-container>
<ng-container matColumnDef="totalEjecutado" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Valor Ejecutado USD
</th>
<td class="Column" mat-cell *matCellDef="let dato; let i = index">
<input matInput type="number" [formControlName]="'totalEjecEnt_' + dato.uzytavpresup_id"
required min="0" pattern="[0-9]+">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<div class="columna">
<div class="input-container" style="font-weight: bold; color:black;">
<mat-form-field class="form-field" style="font-weight: bold;">
<mat-label>Total Planificado </mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalSuma">
</mat-form-field>
</div>
</div>
<div class="columna">
<div class="input-container" style="font-weight: bold; color:black;">
<mat-form-field class="form-field" style="font-weight: bold;">
<mat-label>Total Ejecutado </mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalSumaEjecutado">
</mat-form-field>
</div>
</div>
</div>
</div>
</form>
\ No newline at end of file
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { AporteEntEjecComponent } from './aporte-ent-ejec.component';
describe('AporteEntEjecComponent', () => {
let component: AporteEntEjecComponent;
let fixture: ComponentFixture<AporteEntEjecComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AporteEntEjecComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AporteEntEjecComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { MatTable, MatTableDataSource } from '@angular/material/table';
import { CatalogoPP } from 'src/app/modules/main/Models/catalogo-partidas-presupuestarias';
import { PartidasPresupuestarias } from 'src/app/modules/main/Models/partidas-presupuestarias';
import { PresupuestoPartidas } from 'src/app/modules/main/Models/presupuesto-partidas';
import { Actualiza_datosService } from 'src/app/modules/main/services/actualiza_datos/actualiza_datos.service';
import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service';
import { PresupuestoPartidasService } from 'src/app/modules/main/services/presupuesto-partidas/presupuesto-partidas.service';
import { EnvioFormularioComponent } from '../../../../programa/opciones/envio-formulario/envio-formulario.component';
@Component({
selector: 'app-aporte-ent-ejec',
templateUrl: './aporte-ent-ejec.component.html',
styleUrls: ['./aporte-ent-ejec.component.css']
})
export class AporteEntEjecComponent implements OnInit {
idRecuperado: number;
totalSuma: number = 0;
//Para Mostrar la información
dataSource: MatTableDataSource<PresupuestoPartidas>;
claPre: PartidasPresupuestarias;
partida!: CatalogoPP[];
nombrePartida: string;
formularioEnviado: boolean;
@Output() formularioGuardado = new EventEmitter<void>();
cambio: boolean = false;
dynamicForm: FormGroup; // Declare a FormGroup
presupuesto: PresupuestoPartidas;
totalSumaEjecutado: number = 0;
politicas: any[] = [];
objetivos: any[] = [];
presupuestoPartidas!: PresupuestoPartidas[];
displayedColumns: string[] = [
'Nro',
'bien',
'descripcion',
'total',
'totalEjecutado'
];
@ViewChild(MatTable) table: MatTable<any>;
constructor(
private presupuestoPartidasService: PresupuestoPartidasService,
private id_Compartido: Compartir_idService,
private dialog: MatDialog,
private formBuilder: FormBuilder,
private datosCompartidos: Actualiza_datosService,
) {
this.claPre = new PartidasPresupuestarias();
this.dataSource = new MatTableDataSource<PresupuestoPartidas>([]);
this.presupuesto = new PresupuestoPartidas()
}
ngOnInit(): void {
this.initializeForm()
this.idRecuperado = parseInt(localStorage.getItem('proyectoId'),10);
this.datosCompartidos.datos$.subscribe(() => {
this.obtenerRegistros();
});
this.presupuestoPartidasService.parametrosActualizados.subscribe(() => {
this.obtenerRegistros();
});
}
initializeForm() {
this.dynamicForm = this.formBuilder.group({});
this.dynamicForm.disable(); // Disable all form controls
}
guardarCambios() {
// Iterate through the array and save the changes
this.presupuestoPartidas.forEach(partida => {
const controlName = 'totalEjecEnt_' + partida.uzytavpresup_id;
const value = this.dynamicForm.get(controlName).value;
console.log("valor recuperado xxxx ", value)
this.presupuesto.uzytavpresup_total_ejec = value;
// Send the updated data to the API for this record
this.presupuestoPartidasService.modificarParametros(partida.uzytavpresup_id, this.presupuesto).subscribe(
(response) => {
console.log('Cambios guardados exitosamente para la partida', partida.uzytavpresup_id);
//this.openModal();
this.dynamicForm.disable()
this.cambio = false; // Disable editing mode
this.obtenerRegistros()
},
(error) => {
console.log('Error al guardar los cambios para la partida', partida.uzytavpresup_id, error);
}
);
});
}
openModal() {
const dialogRef = this.dialog.open(EnvioFormularioComponent, {
disableClose: true
});
dialogRef.afterClosed().subscribe(result => {
console.log('La ventana modal se ha cerrado');
this.formularioEnviado = true;
});
}
getSubgrupo3(item: any): string {
return (
item.uzytclasificador_presup_id +
'. ' +
(item.uzytclasificador_presup_nombre || '')
);
}
createDynamicFormControls(partida: PresupuestoPartidas) {
console.log("este es el total actual",partida.uzytavpresup_total_ejec)
this.dynamicForm.addControl('totalEjecEnt_' + partida.uzytavpresup_id,
this.formBuilder.control({ value : partida.uzytavpresup_total_ejec, disabled: true },
[Validators.required, Validators.min(0), Validators.pattern('[0-9]+')]));
this.dynamicForm.disable();
}
obtenerRegistros() {
if (this.idRecuperado !== undefined) {
this.presupuestoPartidasService.obtenerRegistrosRelacionadosEntidadProyecto(this.idRecuperado).subscribe(data => {
if (data !== undefined) {
this.presupuestoPartidas = data.map(partida => {
// Create dynamic form control
this.createDynamicFormControls(partida);
return partida
});
this.dataSource.data = this.presupuestoPartidas;
// Calcular los totales
this.calcularTotales();
this.calcularTotalesEjecutados()
}
});
}
}
calcularTotales() {
this.totalSuma = this.presupuestoPartidas.reduce((total, dato) => {
return total + dato.uzytavpresup_valor * dato.uzytavpresup_cantidad;
}, 0);
this.totalSuma = parseFloat(this.totalSuma.toFixed(2));
}
calcularTotalesEjecutados() {
this.totalSumaEjecutado = this.presupuestoPartidas.reduce((total, dato) => {
return total + dato.uzytavpresup_total_ejec;
}, 0);
this.totalSumaEjecutado = parseFloat(this.totalSumaEjecutado.toFixed(2));
}
cambiar() {
this.cambio = true;
this.dynamicForm.enable();
}
cancelado() {
this.cambio = false;
this.dynamicForm.disable();
}
guardar() {
this.cambio = false;
this.dynamicForm.disable();
}
}
.principal {
text-align: center;
margin-bottom: 2%;
}
.grid-container {
display: grid;
grid-template-columns: 5% 10% 45% 10% 5% 10% 15%;
border: 1px solid #ccc;
}
.titulo{
text-align: center;
margin: 3px;
font-weight: bold;
}
#cabecera {
background: linear-gradient(135deg,
var(--background-base) 22px,
var(--background-hover) 22px,
var(--background-hover) 24px,
transparent 24px,
transparent 67px,
var(--background-hover) 67px,
var(--background-hover) 69px,
transparent 69px),
linear-gradient(225deg,
var(--background-base) 22px,
var(--background-hover) 22px,
var(--background-hover) 24px,
transparent 24px,
transparent 67px,
var(--background-hover) 67px,
var(--background-hover) 69px,
transparent 69px) 0 64px;
background-color: var(--background-base);
background-size: 64px 128px;
}
.Column {
padding-left: 0px;
padding-right: 0px;
width: 100px;
white-space: inherit;
/* overflow: visible;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; */
}
.Column1 {
padding-left: 0px;
padding-right: 0px;
width: 10px;
white-space: normal;
overflow: visible;
}
.Column2 {
width: 25px;
padding-left: 0px;
padding-right: 0px;
}
.volver{
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
border-radius: 50%;
background-color: white;
display: flex;
color: rgb(71, 127, 75);
align-items: center;
justify-content: center;
padding: 0;
width: 32px;
height: 32px;
border: none;
outline: none;
cursor: pointer;
}
.grid-item {
font-weight: bold;
}
.grid-opciones {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.titulo {
display: flex;
align-items: center;
justify-content: center;
}
.titulo-texto {
font-weight: bold;
font-size: 18px;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
margin-right: 10px;
}
.componente {
justify-content: center;
align-items: center;
}
.card {
background-color: rgb(252, 252, 251)
}
.colorEditar {
color: blue;
}
.colorEditar svg {
fill: blue;
}
.contenedorP {
width: 96%;
margin-left: 2%;
margin-right: 2%;
margin: 10px auto;
border-radius: 10px;
text-align: center;
margin-top: 10%;
background-color: white;
}
.contenedor:not(:last-child) {
margin-bottom: 2px;
}
.separador{
margin-top: 5%;
}
.contenedor {
width: 96%;
margin-left: 2%;
margin-right: 2%;
padding-bottom: 2%;
border-radius: 10px;
background-color: white;
position: relative;
z-index: 1;
}
.sobremontado {
position: relative;
align-items: center;
justify-content: center;
padding: 10px;
width: 96%;
top: -20px;
left: 2%;
background-color: rgb(71, 127, 75);
color: #fff;
text-align: center;
padding: 10px;
box-sizing: border-box;
margin-bottom: -50px;
z-index: 2;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.sobremontado span {
display: flex;
align-items: center;
justify-content: center;
margin: 0;
}
.sobremontado mat-icon {
margin-right: 5px;
}
.icono-instituciones {
display: flex;
align-items: center;
justify-content: center;
margin-right: 5px;
font-size: 20px;
cursor: pointer;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
font-family: 'Roboto', sans-serif;
color: #333;
}
table th,
table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e0e0e0;
}
table th {
background-color: rgb(248, 249, 250);
font-weight: bold;
text-transform: uppercase;
}
table td {
position: relative;
}
table td::after {
content: "";
position: absolute;
bottom: -1px;
left: 0;
width: 100%;
height: 1px;
background-color: #e0e0e0;
}
input[type="text"] {
width: 200px;
padding: 8px;
border: 1px solid #ccc;
border-radius: 5px;
margin-left: 10px;
}
.area-busqueda {
padding: 20px;
margin-top: 30px;
text-align: right;
}
@media (max-width: 600px) {
table {
font-size: 14px;
}
table th,
table td {
padding: 8px;
}
}
.btn-observar {
border-radius: 50%;
width: 36px;
height: 36px;
}
.colorsito{
background-color: rgb(248, 249, 250);
}
.rounder{
border-radius: 50%;
background-color: rgb(71, 127, 75);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
width: 15%;
height: 40px;
border: none;
outline: none;
cursor: pointer;
}
.rounder mat-icon {
font-size: 24px;
color: #fff;
}
@media (max-width: 768px) {
.rounder {
width: 30%;
}
}
@media (max-width: 480px) {
.rounder {
width: 40%;
}
}
.margen{
margin: 10px;
padding: 10px;
margin-bottom: 10px;
}
.bordes {
border-collapse: collapse;
width: 100%;
}
.bordes th,
.bordes td {
border: 1px solid black;
padding: 8px;
}
.bordes th {
background-color: #f5f5f5;
font-weight: bold;
}
.bordes td {
background-color: #ffffff;
}
.bordes tr:nth-child(even) {
background-color: #f9f9f9;
}
.bordes tr:hover {
background-color: #eaeaea;
}
.bordes th:last-child,
.bordes td:last-child {
border-bottom: none;
}
.rounder-nuevo {
border-radius: 50%;
background-color: rgb(71, 127, 75);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
width: 36px;
height: 36px;
border: none;
outline: none;
cursor: pointer;
margin-left: 5px;
}
.white-icon {
color: white;
}
.btn{
padding: 0 2% 0 2%;
}
.azul {
color: blue;
}
.institution {
display: flex;
align-items: center;
}
.institution-name {
font-size: 20px;
/* Tamaño de fuente deseado */
font-weight: bold;
/* Opcional, para hacerlo más destacado */
margin-right: 30px;
/* Espacio entre el icono y el nombre */
}
.formulario {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
max-width: 96%;
margin: 0 auto;
background-color: white;
}
/* Estilos para la columna izquierda */
.columna{
width: 32%;
padding-right: 2%;
}
.form-field {
width: 100%;
}
.container{
margin: 10px;
}
.input-container {
width: 100%;
display: flex;
flex-direction: column;
}
.add-icon {
display: flex;
align-items: center;
justify-content: center;
width: 25px;
/* Ancho del círculo */
height: 25px;
/* Altura del círculo */
border-radius: 50%;
/* Para crear la forma de círculo */
background-color: white;
/* Color de fondo del círculo */
color: black;
/* Color del signo "+" en el círculo */
font-size: 25px;
/* Tamaño del signo "+" */
}
\ No newline at end of file
<form [formGroup]="dynamicForm" (ngSubmit)="guardarCambios()">
<div class="container">
<div class="save-button">
<button mat-raised-button color="primary" *ngIf="!cambio" (click)="cambiar()">Editar</button>
<button mat-raised-button color="primary" *ngIf="cambio">Guardar</button>
<span class="separator"></span>
<button mat-raised-button color="warn" *ngIf="cambio" (click)="cancelado()">Cancelar</button>
</div>
<mat-label class="titulo">Aporte de la Universidad</mat-label>
<div class="mat-elevation-z8">
<table mat-table [dataSource]="dataSource" matSort>
<!-- Nro Column -->
<ng-container matColumnDef="Nro" class="Column1">
<th class="Column1 negrita" mat-header-cell *matHeaderCellDef mat-sort-header> Nro </th>
<td class="Column1" mat-cell *matCellDef="let i = index"> {{ i+1 }}
</td>
</ng-container>
<!-- Nombre Institución Column -->
<ng-container matColumnDef="partida" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header> Partida Presupuestaria</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{dato.partida$ | async }} </td>
</ng-container>
<ng-container matColumnDef="descripcion" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Descripción</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{dato.uzytavpresup_esptecnic}}
</td>
</ng-container>
<ng-container matColumnDef="gasto" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header> Tipo de Gasto </th>
<td class="Column" mat-cell *matCellDef="let dato">
<ng-container [ngSwitch]="dato.uzytavpresup_tipogasto">
<span *ngSwitchCase="'C'">Permanente</span>
<span *ngSwitchCase="'I'">No Permanente</span>
</ng-container>
</td>
</ng-container>
<ng-container matColumnDef="total" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Valor Planificado USD
</th>
<td class="Column" mat-cell *matCellDef="let dato">
{{ (dato.uzytavpresup_valor * dato.uzytavpresup_cantidad) | number:'1.2-2' }}
</td>
</ng-container>
<!-- Total Ejecutado Column -->
<ng-container matColumnDef="totalEjecutado" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Valor Ejecutado USD
</th>
<td class="Column" mat-cell *matCellDef="let dato; let i = index">
<input matInput type="number" [formControlName]="'totalEjec_' + dato.uzytavpresup_id"
required min="0" pattern="[0-9]+" [value]="dato.uzytavpresup_total_ejec">
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<div class="formulario">
<div class="columna">
<div class="input-container">
<mat-form-field class="form-field" style="font-weight: bold; color:black;">
<mat-label>Sumatoria de Permanentes</mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalPermanente">
</mat-form-field>
</div>
</div>
<div class="columna">
<div class="input-container">
<mat-form-field class="form-field" style="font-weight: bold; color:black;">
<mat-label>Sumatoria de No Permanentes</mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalNoPermanente">
</mat-form-field>
</div>
</div>
<div class="columna">
<div class="input-container" style="font-weight: bold; color:black;">
<mat-form-field class="form-field" style="font-weight: bold;">
<mat-label>Total (Permanente + No Permanente)</mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalSuma">
</mat-form-field>
</div>
</div>
<div class="columna">
<div class="input-container">
<mat-form-field class="form-field" style="font-weight: bold; color:black;">
<mat-label>Sumatoria Permanente Ejecutado</mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalPermanenteEjecutado">
</mat-form-field>
</div>
</div>
<div class="columna">
<div class="input-container">
<mat-form-field class="form-field" style="font-weight: bold; color:black;">
<mat-label>Sumatoria No Permanente Ejecutado</mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalNoPermanenteEjecutado">
</mat-form-field>
</div>
</div>
<div class="columna">
<div class="input-container" style="font-weight: bold; color:black;">
<mat-form-field class="form-field" style="font-weight: bold;">
<mat-label>Total Ejecutado (P+ NP)</mat-label>
<input matInput [disabled]="true" required pattern="\d+(\.\d+)?" [value]="totalSumaEjecutado">
</mat-form-field>
</div>
</div>
</div>
</div>
</div>
</form>
\ No newline at end of file
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { AporteUniEjecComponent } from './aporte-uni-ejec.component';
describe('AporteUniEjecComponent', () => {
let component: AporteUniEjecComponent;
let fixture: ComponentFixture<AporteUniEjecComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AporteUniEjecComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AporteUniEjecComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { MatTable, MatTableDataSource } from '@angular/material/table';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { CatalogoPP } from 'src/app/modules/main/Models/catalogo-partidas-presupuestarias';
import { PartidasPresupuestarias } from 'src/app/modules/main/Models/partidas-presupuestarias';
import { PresupuestoPartidas } from 'src/app/modules/main/Models/presupuesto-partidas';
import { Actualiza_datosService } from 'src/app/modules/main/services/actualiza_datos/actualiza_datos.service';
import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service';
import { PartidasPresupuestariasService } from 'src/app/modules/main/services/partidas-presupuestarias/partidas-presupuestarias.service';
import { PresupuestoPartidasService } from 'src/app/modules/main/services/presupuesto-partidas/presupuesto-partidas.service';
import { EnvioFormularioComponent } from '../../../../programa/opciones/envio-formulario/envio-formulario.component';
@Component({
selector: 'app-aporte-uni-ejec',
templateUrl: './aporte-uni-ejec.component.html',
styleUrls: ['./aporte-uni-ejec.component.css']
})
export class AporteUniEjecComponent implements OnInit {
formularioEnviado: boolean;
@Output() formularioGuardado = new EventEmitter<void>();
idRecuperado: number;
totalPermanente: number = 0;
totalNoPermanente: number = 0;
totalSuma: number = 0;
totalPermanenteEjecutado: number = 0;
totalNoPermanenteEjecutado: number = 0;
totalSumaEjecutado: number = 0;
//Para Mostrar la información
dataSource: MatTableDataSource<PresupuestoPartidas>;
claPre: PartidasPresupuestarias;
partida!: CatalogoPP[];
nombrePartida: string;
cambio: boolean = false;
dynamicForm: FormGroup; // Declare a FormGroup
presupuesto: PresupuestoPartidas;
politicas: any[] = [];
objetivos: any[] = [];
presupuestoPartidas!: PresupuestoPartidas[];
displayedColumns: string[] = [
'Nro',
'partida',
'descripcion',
'gasto',
'total',
'totalEjecutado',
];
@ViewChild(MatTable) table: MatTable<any>;
constructor(
private presupuestoPartidasService: PresupuestoPartidasService,
private id_Compartido: Compartir_idService,
private dialog: MatDialog,
private formBuilder: FormBuilder,
private datosCompartidos: Actualiza_datosService,
private partidaS: PartidasPresupuestariasService,
) {
this.claPre = new PartidasPresupuestarias();
this.dataSource = new MatTableDataSource<PresupuestoPartidas>([]);
this.presupuesto = new PresupuestoPartidas()
}
ngOnInit(): void {
this.initializeForm()
this.idRecuperado = parseInt(localStorage.getItem('proyectoId'), 10);
this.datosCompartidos.datos$.subscribe(() => {
this.obtenerRegistros();
});
this.presupuestoPartidasService.parametrosActualizados.subscribe(() => {
this.obtenerRegistros();
});
}
initializeForm() {
this.dynamicForm = this.formBuilder.group({});
this.dynamicForm.disable(); // Disable all form controls
}
openModal() {
const dialogRef = this.dialog.open(EnvioFormularioComponent, {
disableClose: true
});
dialogRef.afterClosed().subscribe(result => {
console.log('La ventana modal se ha cerrado');
this.formularioEnviado = true;
});
}
guardarCambios() {
// Iterate through the array and save the changes
this.presupuestoPartidas.forEach(partida => {
const controlName = 'totalEjec_' + partida.uzytavpresup_id;
const value = this.dynamicForm.get(controlName).value;
console.log("valor recuperado xxxx ", value)
this.presupuesto.uzytavpresup_total_ejec = value;
// Send the updated data to the API for this record
this.presupuestoPartidasService.modificarParametros(partida.uzytavpresup_id, this.presupuesto).subscribe(
(response) => {
console.log('Cambios guardados exitosamente para la partida', partida.uzytavpresup_id);
//this.openModal();
this.dynamicForm.disable()
this.cambio = false; // Disable editing mode
this.obtenerRegistros()
},
(error) => {
console.log('Error al guardar los cambios para la partida', partida.uzytavpresup_id, error);
}
);
});
}
getSubgrupo3(item: any): string {
return (
item.uzytclasificador_presup_id +
'. ' +
(item.uzytclasificador_presup_nombre || '')
);
}
obtenerRegistros() {
this.idRecuperado = this.idRecuperado;
if (this.idRecuperado !== undefined) {
this.presupuestoPartidasService.obtenerRegistrosRelacionadosUniversidadProyecto(this.idRecuperado).subscribe(data => {
if (data !== undefined) {
this.presupuestoPartidas = data.map(partida => {
// Create dynamic form control
this.createDynamicFormControls(partida);
return {
...partida,
partida$: this.obtenerPartidas(partida.uzytavclaspre_id)
};
});
this.dataSource.data = this.presupuestoPartidas;
// Calcular los totales
this.calcularTotales();
this.calcularTotalesEjecutados()
}
});
}
}
createDynamicFormControls(partida: PresupuestoPartidas) {
this.dynamicForm.addControl('totalEjec_' + partida.uzytavpresup_id,
this.formBuilder.control({ value : partida.uzytavpresup_total_ejec,disabled: true },
[Validators.required, Validators.min(0), Validators.pattern('[0-9]+')]));
this.dynamicForm.disable();
}
obtenerPartidas(id: number): Observable<string> {
return this.partidaS.obtenerNombrePartidas(id).pipe(
map(partida => {
const partidaEncontrada = partida.find(c => c.uzytavclaspre_id === id);
return partidaEncontrada ? partidaEncontrada.uzytclasificador_presup_id + ". "
+ partidaEncontrada.uzytclasificador_presup_nombre : 'No encontrado';
})
);
}
calcularTotales() {
this.totalPermanente = this.presupuestoPartidas.reduce((total, dato) => {
if (dato.uzytavpresup_tipogasto == "C") {
return total + dato.uzytavpresup_valor * dato.uzytavpresup_cantidad;
} else {
return total; // Si no es "C", devolver el total sin cambiarlo
}
}, 0);
this.totalNoPermanente = this.presupuestoPartidas.reduce((total, dato) => {
if (dato.uzytavpresup_tipogasto == "I") {
return total + dato.uzytavpresup_valor * dato.uzytavpresup_cantidad;
} else {
return total; // Si no es "I", devolver el total sin cambiarlo
}
}, 0);
this.totalPermanente = parseFloat(this.totalPermanente.toFixed(2));
this.totalNoPermanente = parseFloat(this.totalNoPermanente.toFixed(2));
this.totalSuma = this.totalPermanente + this.totalNoPermanente;
}
calcularTotalesEjecutados() {
this.totalPermanenteEjecutado = this.presupuestoPartidas.reduce((total, dato) => {
if (dato.uzytavpresup_tipogasto == "C") {
return total + dato.uzytavpresup_total_ejec;
} else {
return total; // Si no es "C", devolver el total sin cambiarlo
}
}, 0);
this.totalNoPermanenteEjecutado = this.presupuestoPartidas.reduce((total, dato) => {
if (dato.uzytavpresup_tipogasto == "I") {
return total + dato.uzytavpresup_total_ejec;
} else {
return total; // Si no es "I", devolver el total sin cambiarlo
}
}, 0);
this.totalPermanenteEjecutado = parseFloat(this.totalPermanenteEjecutado.toFixed(2));
this.totalNoPermanenteEjecutado = parseFloat(this.totalNoPermanenteEjecutado.toFixed(2));
this.totalSumaEjecutado = this.totalPermanenteEjecutado + this.totalNoPermanenteEjecutado;
}
cambiar() {
this.cambio = true;
this.dynamicForm.enable();
}
cancelado() {
this.cambio = false;
this.dynamicForm.disable();
}
guardar() {
this.cambio = false;
this.dynamicForm.disable();
}
}
.editor-separator{ .editor-separator{
margin-top: 4%; margin-top: 4%;
} }
.error-message {
color: red;
font-size: 14px;
margin-top: 5px;
}
<div class="container"> <div class="container">
<form class="example-form" [formGroup]="myForm" (ngSubmit)="onSubmit()" > <form class="example-form" [formGroup]="myForm" (ngSubmit)="onSubmit()">
<mat-card> <mat-card>
<mat-card-header> <mat-card-header>
<div class="save-button"> <div class="save-button">
<button mat-raised-button color="primary" *ngIf="!cambio" <button mat-raised-button color="primary" *ngIf="!cambio"
(click)="cambiar()">Editar</button> (click)="cambiar()">Editar</button>
<button mat-raised-button color="primary" *ngIf="cambio" <button mat-raised-button color="primary" *ngIf="cambio"
>Guardar</button> [disabled]="!myForm.valid">Guardar</button>
<span class="separator"></span> <span class="separator"></span>
<button mat-raised-button color="warn" *ngIf="cambio" <button mat-raised-button color="warn" *ngIf="cambio"
(click)="cancelado()">Cancelar</button> (click)="cancelado()">Cancelar</button>
...@@ -15,41 +15,83 @@ ...@@ -15,41 +15,83 @@
<mat-card-content> <mat-card-content>
<div> <div>
<label class="label-negrita"> <strong>Productos y/o servicios generados por el proyecto:</strong> </label> <label class="label-negrita"> <strong>Productos y/o servicios
<ckeditor formControlName="productoCierre" class="custom-ckeditor" [disabled]="!isEditorEnabled" [style.height]="editorHeight" [editor]="Editor"></ckeditor> generados por el proyecto:</strong> </label>
<ckeditor formControlName="productoCierre" class="custom-ckeditor"
[disabled]="!isEditorEnabled" [style.height]="editorHeight"
[editor]="Editor"></ckeditor>
<div *ngIf="myForm.get('productoCierre').hasError('maxlength')"
class="error-message">
El contenido no puede exceder los 500 caracteres.
</div>
</div> </div>
<div class="editor-separator"></div> <div class="editor-separator"></div>
<div> <div>
<label class="label-negrita"> <strong>Bienes a favor de la ESPE:</strong></label> <label class="label-negrita"> <strong>Bienes a favor de la ESPE:</strong></label>
<ckeditor formControlName="bienesCierre" class="custom-ckeditor" [disabled]="!isEditorEnabled" [style.height]="editorHeight" [editor]="Editor"></ckeditor> <ckeditor formControlName="bienesCierre" class="custom-ckeditor"
[disabled]="!isEditorEnabled" [style.height]="editorHeight"
[editor]="Editor"></ckeditor>
<div *ngIf="myForm.get('bienesCierre').hasError('maxlength')"
class="error-message">
El contenido no puede exceder los 500 caracteres.
</div>
</div> </div>
<div class="editor-separator"></div> <div class="editor-separator"></div>
<div> <div>
<label class="label-negrita"> <strong>Resultados del proyecto:</strong></label> <label class="label-negrita"> <strong>Resultados del proyecto:</strong></label>
<ckeditor formControlName="resultadoCierre" class="custom-ckeditor" [disabled]="!isEditorEnabled" [style.height]="editorHeight" [editor]="Editor"></ckeditor> <ckeditor formControlName="resultadoCierre" class="custom-ckeditor"
[disabled]="!isEditorEnabled" [style.height]="editorHeight"
[editor]="Editor"></ckeditor>
<div *ngIf="myForm.get('resultadoCierre').hasError('maxlength')"
class="error-message">
El contenido no puede exceder los 500 caracteres.
</div>
</div> </div>
<div class="editor-separator"></div> <div class="editor-separator"></div>
<div> <div>
<label class="label-negrita"> <strong>Otras aplicaciones del producto y/o servicios:</strong></label> <label class="label-negrita"> <strong>Otras aplicaciones del producto
<ckeditor formControlName="servicioCierre" class="custom-ckeditor" [disabled]="!isEditorEnabled" [style.height]="editorHeight" [editor]="Editor"></ckeditor> y/o servicios:</strong></label>
<ckeditor formControlName="servicioCierre" class="custom-ckeditor"
[disabled]="!isEditorEnabled" [style.height]="editorHeight"
[editor]="Editor"></ckeditor>
<div *ngIf="myForm.get('servicioCierre').hasError('maxlength')"
class="error-message">
El contenido no puede exceder los 500 caracteres.
</div>
</div> </div>
<div class="editor-separator"></div> <div class="editor-separator"></div>
<div> <div>
<label class="label-negrita"> <strong>Impacto futuro del proyecto:</strong></label> <label class="label-negrita"> <strong>Impacto futuro del proyecto:</strong></label>
<ckeditor formControlName="impactoCierre" class="custom-ckeditor" [disabled]="!isEditorEnabled" [style.height]="editorHeight" [editor]="Editor"></ckeditor> <ckeditor formControlName="impactoCierre" class="custom-ckeditor"
[disabled]="!isEditorEnabled" [style.height]="editorHeight"
[editor]="Editor"></ckeditor>
<div *ngIf="myForm.get('impactoCierre').hasError('maxlength')"
class="error-message">
El contenido no puede exceder los 500 caracteres.
</div>
</div> </div>
<div class="editor-separator"></div> <div class="editor-separator"></div>
<div> <div>
<label class="label-negrita"> <strong>Restricciones que limitan el impacto del proyecto:</strong></label> <label class="label-negrita"> <strong>Restricciones que limitan el
<ckeditor formControlName="restricCierre" class="custom-ckeditor" [disabled]="!isEditorEnabled" [style.height]="editorHeight" [editor]="Editor"></ckeditor> impacto del proyecto:</strong></label>
<ckeditor formControlName="restricCierre" class="custom-ckeditor"
[disabled]="!isEditorEnabled" [style.height]="editorHeight"
[editor]="Editor"></ckeditor>
<div *ngIf="myForm.get('restricCierre').hasError('maxlength')" class="error-message">
El contenido no puede exceder los 500 caracteres.
</div>
</div> </div>
<div class="editor-separator"></div> <div class="editor-separator"></div>
<div> <div>
<label class="label-negrita"> <strong>Comentarios Generales:</strong></label> <label class="label-negrita"> <strong>Comentarios Generales:</strong></label>
<ckeditor formControlName="comenCierre" class="custom-ckeditor" [disabled]="!isEditorEnabled" [style.height]="editorHeight" [editor]="Editor"></ckeditor> <ckeditor formControlName="comenCierre" class="custom-ckeditor"
[disabled]="!isEditorEnabled" [style.height]="editorHeight"
[editor]="Editor"></ckeditor>
<div *ngIf="myForm.get('comenCierre').hasError('maxlength')" class="error-message">
El contenido no puede exceder los 500 caracteres.
</div>
</div> </div>
</mat-card-content> </mat-card-content>
......
...@@ -7,6 +7,7 @@ import { ProyectosService } from 'src/app/modules/main/services/proyectos/proyec ...@@ -7,6 +7,7 @@ import { ProyectosService } from 'src/app/modules/main/services/proyectos/proyec
import ClassicEditor from '../../../ckeditor-custom/build/ckeditor'; import ClassicEditor from '../../../ckeditor-custom/build/ckeditor';
import { EnvioFormularioComponent } from '../../../../programa/opciones/envio-formulario/envio-formulario.component'; import { EnvioFormularioComponent } from '../../../../programa/opciones/envio-formulario/envio-formulario.component';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { ErrorTextoComponent } from '../../../errores/error-texto/error-texto.component';
@Component({ @Component({
selector: 'vex-resultados', selector: 'vex-resultados',
templateUrl: './resultados.component.html', templateUrl: './resultados.component.html',
...@@ -45,13 +46,13 @@ export class ResultadosComponent implements OnInit { ...@@ -45,13 +46,13 @@ export class ResultadosComponent implements OnInit {
this.obtenerRegistros(); this.obtenerRegistros();
this.myForm = this.formBuilder.group({ this.myForm = this.formBuilder.group({
productoCierre: [this.proyectos.uzytavproyec_cierre_prod, Validators.required], productoCierre: [this.proyectos.uzytavproyec_cierre_prod, [Validators.required, Validators.maxLength(500)]],
bienesCierre: [this.proyectos.uzytavproyec_cierre_bien, Validators.required], bienesCierre: [this.proyectos.uzytavproyec_cierre_bien, [Validators.required, Validators.maxLength(500)]],
resultadoCierre: [this.proyectos.uzytavproyec_cierre_resul, Validators.required], resultadoCierre: [this.proyectos.uzytavproyec_cierre_resul, [Validators.required, Validators.maxLength(500)]],
servicioCierre: [this.proyectos.uzytavproyec_cierre_aplic, Validators.required], servicioCierre: [this.proyectos.uzytavproyec_cierre_aplic, [Validators.required, Validators.maxLength(500)]],
impactoCierre: [this.proyectos.uzytavproyec_cierre_imp, Validators.required], impactoCierre: [this.proyectos.uzytavproyec_cierre_imp, [Validators.required, Validators.maxLength(500)]],
restricCierre: [this.proyectos.uzytavproyec_cierre_rest, Validators.required], restricCierre: [this.proyectos.uzytavproyec_cierre_rest,[Validators.required, Validators.maxLength(500)]],
comenCierre: [this.proyectos.uzytavproyec_cierre_comen, Validators.required] comenCierre: [this.proyectos.uzytavproyec_cierre_comen, [Validators.required, Validators.maxLength(500)]]
}); });
} }
...@@ -84,6 +85,7 @@ export class ResultadosComponent implements OnInit { ...@@ -84,6 +85,7 @@ export class ResultadosComponent implements OnInit {
this.proyectos.uzytavproyec_cierre_imp = this.myForm.get('impactoCierre').value; this.proyectos.uzytavproyec_cierre_imp = this.myForm.get('impactoCierre').value;
this.proyectos.uzytavproyec_cierre_rest = this.myForm.get('restricCierre').value; this.proyectos.uzytavproyec_cierre_rest = this.myForm.get('restricCierre').value;
this.proyectos.uzytavproyec_cierre_comen = this.myForm.get('comenCierre').value; this.proyectos.uzytavproyec_cierre_comen = this.myForm.get('comenCierre').value;
console.log('observación', this.proyectos.uzytavproyec_cierre_comen)
this.proyectosService.modificarParametros(this.idRecuperado, this.proyectos).subscribe(response => { this.proyectosService.modificarParametros(this.idRecuperado, this.proyectos).subscribe(response => {
this.cambio = false; this.cambio = false;
this.isEditorEnabled = false; this.isEditorEnabled = false;
...@@ -91,7 +93,8 @@ export class ResultadosComponent implements OnInit { ...@@ -91,7 +93,8 @@ export class ResultadosComponent implements OnInit {
}); });
} catch (error) { } catch (error) {
console.error('Error al enviar los datos:', error); console.error(error)
this.openEror();
} }
} }
} }
...@@ -106,4 +109,14 @@ export class ResultadosComponent implements OnInit { ...@@ -106,4 +109,14 @@ export class ResultadosComponent implements OnInit {
this.formularioEnviado = true; this.formularioEnviado = true;
}); });
} }
openEror(){
const dialogRef = this.dialog.open(ErrorTextoComponent, {
disableClose: true
});
dialogRef.afterClosed().subscribe(result => {
this.formularioEnviado = true;
});
}
} }
...@@ -37,6 +37,7 @@ export class ListarCoberturaProyectoComponent implements OnInit { ...@@ -37,6 +37,7 @@ export class ListarCoberturaProyectoComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.idRecuperado = parseInt(localStorage.getItem('proyectoId'),10); this.idRecuperado = parseInt(localStorage.getItem('proyectoId'),10);
console.log('id', this.idRecuperado)
this.datosCompar.datos$.subscribe(() => { this.datosCompar.datos$.subscribe(() => {
this.obtenerRegistros(); this.obtenerRegistros();
this.obtenerProvincias(); this.obtenerProvincias();
......
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
...@@ -25,6 +25,8 @@ import { UsuariosService } from 'src/app/modules/main/services/usuarios/usuarios ...@@ -25,6 +25,8 @@ import { UsuariosService } from 'src/app/modules/main/services/usuarios/usuarios
styleUrls: ['./edit-datos-generales-proyecto.component.css'] styleUrls: ['./edit-datos-generales-proyecto.component.css']
}) })
export class EditDatosGeneralesProyectoComponent implements OnInit { export class EditDatosGeneralesProyectoComponent implements OnInit {
@Input() id: any;
myForm: FormGroup; myForm: FormGroup;
proyecto: Proyectos; proyecto: Proyectos;
cambio: boolean; cambio: boolean;
...@@ -57,6 +59,7 @@ export class EditDatosGeneralesProyectoComponent implements OnInit { ...@@ -57,6 +59,7 @@ export class EditDatosGeneralesProyectoComponent implements OnInit {
) { ) {
this.proyecto = new Proyectos(); this.proyecto = new Proyectos();
console.log('pru',this.id)
} }
ngOnInit(): void { ngOnInit(): void {
......
.area-busqueda {
padding: 20px;
margin-top: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.contenedorP {
width: 96%;
margin-left: 2%;
margin-right: 2%;
margin: 5px auto;
border-radius: 10px;
text-align: center;
margin-top: 2%;
background-color: white;
}
.mat-mdc-radio-button ~ .mat-mdc-radio-button {
margin-left: 16px;
}
.mat-radio-button{
margin-right: 10px;
}
.form-container {
display: flex;
flex-direction: column;
align-items: center;
width: 80%;
}
.formulario {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
max-width: 96%;
margin: 0 auto;
background-color: white;
padding: 10px;
border-radius: 10px;
}
.contenedor-dos {
margin-top: 30px;
padding: 0.9375rem 20px;
position: relative;
}
.form-field {
width: 100%;
margin-bottom: 20px;
}
.separator {
margin: 0 5px;
opacity: 0;
pointer-events: none;
}
.separator2 {
margin: 5px 0;
opacity: 0;
pointer-events: none;
}
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { EditInformeComponent } from './edit-informe.component';
describe('EditInformeComponent', () => {
let component: EditInformeComponent;
let fixture: ComponentFixture<EditInformeComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ EditInformeComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(EditInformeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
@Component({
selector: 'vex-edit-informe',
templateUrl: './edit-informe.component.html',
styleUrls: ['./edit-informe.component.css']
})
export class EditInformeComponent implements OnInit {
idRecuperado: number;
myForm: FormGroup;
constructor(
private formBuilder: FormBuilder
) {
this.myForm = this.formBuilder.group({
fecha: [''],
observacion: [''],
});
}
ngOnInit(): void {
this.idRecuperado = parseInt(localStorage.getItem('proyectoId'),10);
}
}
/* Estilos generales */
.container {
width: 100%;
max-width: 1200px; /* Cambia este valor según tus necesidades */
margin: 0 auto;
padding: 20px;
box-sizing: border-box;
}
/* Estilos de la tabla */
.table-container {
overflow-x: auto;
}
table {
width: 100%;
max-width: 100%;
border-collapse: collapse;
font-family: 'Roboto', sans-serif;
color: #333;
border: 1px solid #e0e0e0;
}
table th,
table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e0e0e0;
}
table th {
background-color: rgb(248, 249, 250);
font-weight: bold;
text-transform: uppercase;
}
/* Ajuste de la celda que contiene el componente expandido */
td.expanded-cell {
padding: 0;
}
/* Estilos del botón de expansión */
.button-expand {
padding: 0;
border: none;
background-color: transparent;
cursor: pointer;
}
.button-expand mat-icon {
font-size: 24px;
}
/* Estilos del componente expandido */
.expanded-content {
padding: 10px;
background-color: white;
}
/* Estilos del botón de eliminación */
.button-delete {
border: none;
background-color: transparent;
cursor: pointer;
}
.button-delete mat-icon {
color: red;
}
/* Estilos del contenedor principal */
.contenedorP {
width: 100%;
margin: 10px auto;
border-radius: 10px;
text-align: center;
background-color: white;
}
/* Estilos de los botones redondos */
.rounder {
border-radius: 50%;
background-color: rgb(71, 127, 75);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
width: 36px;
height: 36px;
border: none;
outline: none;
cursor: pointer;
}
.rounder mat-icon {
font-size: 24px;
color: #fff;
}
/* Estilos de los íconos de edición */
.colorEditar {
color: blue;
}
.colorEditar svg {
fill: blue;
}
/* Estilos del encabezado de la tabla */
.colorsito {
background-color: rgb(248, 249, 250);
}
/* Media Queries para pantallas pequeñas */
@media (max-width: 768px) {
table th,
table td {
padding: 8px;
}
}
@media (max-width: 1200px) {
table th,
table td {
padding: 10px;
}
}
<div class="container">
<div class="div-container">
<label class="label-negrita"><strong>Listado de informes de avance</strong></label>
</div>
<div class="mat-elevation-z8">
<table>
<thead>
<tr>
<th class="Column1"></th>
<th class="Column1 negrita">Nro</th>
<th class="Column1 negrita">Fecha</th>
<th class="Column1 negrita">Observación</th>
<th class="Column1 negrita">Acciones</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let item of objetivoEspe; let i = index">
<tr id="fila-{{i}}">
<td>
<button (click)="toggleDiv(i)">
<mat-icon>{{ mostrarDiv[i] ? 'keyboard_arrow_down' :
'keyboard_arrow_right' }}</mat-icon>
</button>
</td>
<td>
{{i+1}}
</td>
<td>{{item.uzytavobjetivo_programaobjetivo_proy}}</td>
<td>{{item.uzytavobjetivo_programaindicador_tipo}}</td>
<td>
<button>
<mat-icon color="warn"
(click)="eliminar(item.uzytavobjetivo_programa_id)">delete</mat-icon>
</button>
</td>
</tr>
<!-- tabla interna para cada item -->
<tr *ngIf="mostrarDiv[i]">
<td colspan="8">
<div class="container">
<div class="">
<table>
<thead>
<tr>
<th class="Column1 negrita">Nro</th>
<th class="Column1 negrita">Descripción</th>
<th class="Column1 negrita">Tipo Indicador</th>
<th class="Column1 negrita">Valor Indicador</th>
<th class="Column1 negrita">Descripción Indicador</th>
<th class="Column1 negrita">Medio de Verificación</th>
<th class="Column1 negrita">Supuestos</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let acti of objetivoEspe; let i = index">
<ng-container
*ngIf="acti.uzytavobjetivo_programa_id_padre === item.uzytavobjetivo_programa_id">
<td>{{ i+1 }}</td>
<td>{{acti.uzytavobjetivo_programaobjetivo_proy}}</td>
<td>{{acti.uzytavobjetivo_programaindicador_tipo}}</td>
<td>{{acti.uzytavobjetivo_programaindicador_valor}}</td>
<td>{{acti.uzytavobjetivo_programaindicador}}</td>
<td>{{acti.uzytavobjetivo_programamverifica}}</td>
<td>{{acti.uzytavobjetivo_programasupuestos}}</td>
</ng-container>
</tr>
</tbody>
</table>
</div>
</div>
</td>
</tr>
</ng-container>
</tbody>
</table>
</div>
</div>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ListInformeComponent } from './list-informe.component';
describe('ListInformeComponent', () => {
let component: ListInformeComponent;
let fixture: ComponentFixture<ListInformeComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ListInformeComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(ListInformeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { objetivoprograma } from 'src/app/modules/main/Models/objetivoPrograma';
@Component({
selector: 'vex-list-informe',
templateUrl: './list-informe.component.html',
styleUrls: ['./list-informe.component.css']
})
export class ListInformeComponent implements OnInit {
//para mostrar el div
mostrarDiv: boolean[] = [];
//objetivosEspe
objetivoEspe: objetivoprograma[] = [];
constructor() { }
ngOnInit(): void {
}
//toggle div para desplegar
toggleDiv(i: number){
this.mostrarDiv[i] = !this.mostrarDiv[i];
}
//acciones para eliminar
eliminar(id: number){
}
}
...@@ -47,7 +47,7 @@ export class AddCronogramaActiComponent implements OnInit { ...@@ -47,7 +47,7 @@ export class AddCronogramaActiComponent implements OnInit {
private objM: objetivoprograma private objM: objetivoprograma
) { ) {
this.myForm = this.formBuilder.group({ this.myForm = this.formBuilder.group({
Actividades: [''], Actividades: ['', Validators.required],
fechaIni: ['', Validators.required], fechaIni: ['', Validators.required],
fechaFin: ['', Validators.required], fechaFin: ['', Validators.required],
horaFin: ['', Validators.required], horaFin: ['', Validators.required],
......
...@@ -17,41 +17,37 @@ ...@@ -17,41 +17,37 @@
<button mat-raised-button color="primary" *ngIf="ocultar" <button mat-raised-button color="primary" *ngIf="ocultar"
(click)="AgregarF()" [disabled]="myForm.get('hitos').invalid">Agregar (click)="AgregarF()" [disabled]="myForm.get('hitos').invalid">Agregar
Fecha</button> Fecha</button>
<button mat-raised-button color="primary" *ngIf="showDataAdd">Guardar</button> <button mat-raised-button color="primary" *ngIf="showDataAdd" (click)="enviarInfo()">Guardar</button>
<span class="separator"></span> <span class="separator"></span>
<button mat-raised-button color="warn" *ngIf="showDataAdd" <button mat-raised-button color="warn" *ngIf="showDataAdd"
(click)="cancelarF()">Cancelar</button> (click)="cancelarF()">Cancelar</button>
</div> </div>
<div class="separator2"></div> <div class="separator2"></div>
<!--fecha de inicio--> <!--fecha de inicio-->
<div *ngIf="showDataAdd"> <div *ngIf="showDataAdd">
<mat-label><strong>Fecha de Inicio:</strong></mat-label>
<mat-form-field class="form-field">
<mat-label>Fecha de inicio</mat-label>
<input matInput [matDatepicker]="pickerInicio" formControlName="fechaIniHitos">
<mat-datepicker-toggle matSuffix [for]="pickerInicio"></mat-datepicker-toggle>
<mat-datepicker #pickerInicio></mat-datepicker>
</mat-form-field>
<!-- Descripcion-->
<mat-form-field class="form-field"> <mat-form-field class="form-field">
<mat-label>Hora de inicio</mat-label> <mat-label>Descripción</mat-label>
<input matInput type="time" formControlName="horaIniHitos"> <input matInput formControlName="descrip">
</mat-form-field> </mat-form-field>
<mat-label><strong>Fecha</strong></mat-label>
<!--fecha de fin-->
<mat-label><strong>Fecha de Fin:</strong></mat-label>
<mat-form-field class="form-field"> <mat-form-field class="form-field">
<mat-label>Fecha Fin:</mat-label> <mat-label>Fecha:</mat-label>
<input matInput [matDatepicker]="pickerFin" formControlName="fechaFinHitos"> <input matInput [matDatepicker]="pickerInicio"
<mat-datepicker-toggle matSuffix [for]="pickerFin"></mat-datepicker-toggle> formControlName="fechaIniHitos">
<mat-datepicker #pickerFin></mat-datepicker> <mat-datepicker-toggle matSuffix [for]="pickerInicio"></mat-datepicker-toggle>
<mat-datepicker #pickerInicio></mat-datepicker>
</mat-form-field> </mat-form-field>
<!--fecha por defecto-->
<mat-form-field class="form-field"> <mat-form-field class="form-field">
<mat-label>Hora de Fin</mat-label> <mat-label>Resultados Esperados</mat-label>
<input matInput type="time" formControlName="horaFinHitos"> <input matInput formControlName="resultados">
</mat-form-field> </mat-form-field>
</div> </div>
</form> </form>
</div> </div>
......
...@@ -3,9 +3,11 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; ...@@ -3,9 +3,11 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { CalendarOptions, EventApi, EventClickArg, EventInput } from '@fullcalendar/core'; import { CalendarOptions, EventApi, EventClickArg, EventInput } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid'; import dayGridPlugin from '@fullcalendar/daygrid';
import moment from 'moment'; import moment from 'moment';
import { seguim } from 'src/app/modules/main/Models/hito';
import { objetivoprograma } from 'src/app/modules/main/Models/objetivoPrograma'; import { objetivoprograma } from 'src/app/modules/main/Models/objetivoPrograma';
import { Actualiza_datosService } from 'src/app/modules/main/services/actualiza_datos/actualiza_datos.service'; import { Actualiza_datosService } from 'src/app/modules/main/services/actualiza_datos/actualiza_datos.service';
import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service'; import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service';
import { HitosService } from 'src/app/modules/main/services/hitos/hitos.service';
import { Objetivo_programaService } from 'src/app/modules/main/services/objetivo_programa/objetivo_programa.service'; import { Objetivo_programaService } from 'src/app/modules/main/services/objetivo_programa/objetivo_programa.service';
@Component({ @Component({
selector: 'vex-add-hitos', selector: 'vex-add-hitos',
...@@ -34,14 +36,15 @@ export class AddHitosComponent implements OnInit { ...@@ -34,14 +36,15 @@ export class AddHitosComponent implements OnInit {
private idCompartido: Compartir_idService, private idCompartido: Compartir_idService,
private datosCompartidos: Actualiza_datosService, private datosCompartidos: Actualiza_datosService,
private objM: objetivoprograma, private objM: objetivoprograma,
private objPS: Objetivo_programaService private objPS: Objetivo_programaService,
private hitoS: HitosService,
private hitoM: seguim
) { ) {
this.myForm = this.formBuilder.group({ this.myForm = this.formBuilder.group({
hitos: [''], hitos: ['', Validators.required],
fechaIniHitos: ['', Validators.required], fechaIniHitos: ['', Validators.required],
fechaFinHitos: ['', Validators.required], descrip: ['', Validators.required],
horaFinHitos: ['', Validators.required], resultados: ['', Validators.required]
horaIniHitos: ['', Validators.required],
}); });
} }
...@@ -82,6 +85,7 @@ export class AddHitosComponent implements OnInit { ...@@ -82,6 +85,7 @@ export class AddHitosComponent implements OnInit {
const eventoSeleccionado = info.event; const eventoSeleccionado = info.event;
const id = parseInt(eventoSeleccionado.id, 10); const id = parseInt(eventoSeleccionado.id, 10);
this.eliminarFechas(id); this.eliminarFechas(id);
} }
onUpdate(){ onUpdate(){
...@@ -89,21 +93,16 @@ export class AddHitosComponent implements OnInit { ...@@ -89,21 +93,16 @@ export class AddHitosComponent implements OnInit {
const id_recuperado = this.myForm.get('hitos').value; const id_recuperado = this.myForm.get('hitos').value;
try { try {
const fechaIni = moment(this.myForm.get('fechaIniHitos').value).utc().toDate(); const fechaIni = moment(this.myForm.get('fechaIniHitos').value).utc().toDate();
const horaIni = moment(this.myForm.get('horaIniHitos').value, 'HH:mm').utc().toDate();
const fechaHoraIni = new Date(fechaIni); const fechaHoraIni = new Date(fechaIni);
fechaHoraIni.setUTCHours(horaIni.getUTCHours());
fechaHoraIni.setUTCMinutes(horaIni.getUTCMinutes());
fechaHoraIni.setUTCHours(fechaHoraIni.getUTCHours() - 5); fechaHoraIni.setUTCHours(fechaHoraIni.getUTCHours() - 5);
const fechaHoraSecond = new Date(fechaIni);
fechaHoraSecond.setUTCHours(fechaHoraSecond.getUTCHours() - 3)
this.objM.uzytavobjetivo_programafec_ini = fechaHoraIni; this.objM.uzytavobjetivo_programafec_ini = fechaHoraIni;
const fechaFin = moment(this.myForm.get('fechaFinHitos').value).utc().toDate(); this.objM.uzytavobjetivo_programafec_fin = fechaHoraSecond;
const horaFin = moment(this.myForm.get('horaFinHitos').value, 'HH:mm').utc().toDate();
const fechaHoraFin = new Date(fechaFin);
fechaHoraFin.setUTCHours(horaFin.getUTCHours());
fechaHoraFin.setUTCMinutes(horaFin.getUTCMinutes());
fechaHoraFin.setUTCHours(fechaHoraFin.getUTCHours() - 5);
this.objM.uzytavobjetivo_programafec_fin = fechaHoraFin;
this.objPS.modificarParametros(id_recuperado, this.objM).subscribe(response => { this.objPS.modificarParametros(id_recuperado, this.objM).subscribe(response => {
this.showDataAdd = false; this.showDataAdd = false;
this.ocultar = true; this.ocultar = true;
...@@ -117,6 +116,32 @@ export class AddHitosComponent implements OnInit { ...@@ -117,6 +116,32 @@ export class AddHitosComponent implements OnInit {
} }
} }
enviarInfo(){
if (this.myForm.valid) {
const id_recuperado = this.myForm.get('hitos').value;
try {
const fechaIni = moment(this.myForm.get('fechaIniHitos').value).utc().toDate();
const fechaHoraIni = new Date(fechaIni);
fechaHoraIni.setUTCHours(fechaHoraIni.getUTCHours() - 5);
this.hitoM.uzytavseguim_fecha_logro = fechaHoraIni
this.hitoM.uzytavproyec_id = this.idProyecto;
this.hitoM.uzytavobjetivo_programa_id = id_recuperado;
this.hitoM.uzytavseguim_descrip = this.myForm.get('descrip').value;
this.hitoM.uzytavseguim_logro = this.myForm.get('resultados').value;
this.hitoS.guardarParametros(this.hitoM).subscribe(response => {
});
} catch (error) {
console.error('Error al enviar los datos:', error);
}
}
}
AgregarF(){ AgregarF(){
this.showDataAdd = true; this.showDataAdd = true;
this.ocultar = false; this.ocultar = false;
......
table {
width: 100%;
}
/* Estilos generales */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.sinborder {
text-align: center;
font-weight: bold;
}
.General th {
padding: 10px;
border: 1px solid black;
font-weight: bold;
background-color: #b6b6b6
}
.Duracion th {
padding: 4px;
border: 1px solid black;
font-weight: bold;
background-color: #b6b6b6
}
.encabezado table {
width: 100%;
border-collapse: collapse;
}
.encabezado td {
padding: 10px;
border: 1px solid black;
}
.encabezado .image-cell img {
max-width: 100px;
height: auto;
}
.encabezado .center-cell {
text-align: center;
font-weight: bold;
}
/* Estilos para la tabla de detalles */
.detalle-table {
margin-top: 20px;
width: 100%;
border-collapse: collapse;
}
.detalle-table td {
padding: 5px;
border: 1px solid black;
}
.detalle-table .codigo-cell {
width: 30%;
font-weight: bold;
}
/* Estilos para el pie de página */
.pie {
margin-top: 20px;
text-align: center;
font-size: 12px;
}
.Column {
padding-left: 0px;
padding-right: 0px;
width: 100px;
white-space: inherit;
}
.Column1 negrita {
font-weight: bold;
}
.Column1 {
padding-left: 0px;
padding-right: 0px;
width: 10px;
white-space: normal;
overflow: visible;
}
.Column2 {
width: 25px;
padding-left: 0px;
padding-right: 0px;
}
.label-negrita {
font-weight: bold;
margin-right: 10px;
margin-top: 10px;
}
.div-container {
display: flex;
align-items: center;
padding: 0%;
}
.container {
padding: 0%;
margin: none;
}
.Marco_Lógico tr {
border: 5px;
}
.containerActividades {
padding: 0%;
border-left: 15px;
}
.container tr {
border-top: 3%;
border-width: 3%;
}
.separa {
margin-top: 3%;
}
.grid-container {
display: grid;
grid-template-columns: 5% 10% 45% 10% 5% 10% 15%;
border: 1px solid #ccc;
}
table,
th,
tr,
td {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
.mat-elevation-z8 table {
border-collapse: collapse;
width: 100%;
}
.mat-elevation-z8 th,
.mat-elevation-z8 td {
border: 1px solid black;
text-align: left;
}
.mat-elevation-z8 th {
background-color: #f2f2f2;
}
\ No newline at end of file
<div class="container">
<table>
<tr class="Duracion">
<th colspan="8">Aporte de la Comunidad Beneficiaria </th>
</tr>
</table>
<table>
<tr class="Duracion">
<th class="Column1 negrita">Nro</th>
<th class="Column negrita">Bien y/o Servicio</th>
<th class="Column negrita">Descripción</th>
<th class="Column negrita">Cantidad</th>
<th class="Column negrita">Valor Unitario USD</th>
<th class="Column negrita">Total USD</th>
</tr>
<tr *ngFor="let datoss of presupuestoPartidas; let i = index">
<td class="Column1">{{ i + 1 }}</td>
<td class="Column">{{ datoss.uzytavpresup_bien_servicio }}</td>
<td class="Column">{{ datoss.uzytavpresup_esptecnic }}</td>
<td class="Column">{{ datoss.uzytavpresup_cantidad }}</td>
<td class="Column">{{ datoss.uzytavpresup_valor }}</td>
<td class="Column">{{ (datoss.uzytavpresup_valor * datoss.uzytavpresup_cantidad) | number:'1.2-2' }}</td>
</tr>
<tr >
<th> Total: </th>
<th colspan="5" style="text-align: center;"> {{totalSuma}} </th>
</tr>
</table>
</div>
\ No newline at end of file
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { ListComunidadComponent } from './list-comunidad.component';
describe('ListComunidadComponent', () => {
let component: ListComunidadComponent;
let fixture: ComponentFixture<ListComunidadComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ListComunidadComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ListComunidadComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatTable, MatTableDataSource } from '@angular/material/table';
import { CatalogoPP } from 'src/app/modules/main/Models/catalogo-partidas-presupuestarias';
import { PartidasPresupuestarias } from 'src/app/modules/main/Models/partidas-presupuestarias';
import { PresupuestoPartidas } from 'src/app/modules/main/Models/presupuesto-partidas';
import { Actualiza_datosService } from 'src/app/modules/main/services/actualiza_datos/actualiza_datos.service';
import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service';
import { PresupuestoPartidasService } from 'src/app/modules/main/services/presupuesto-partidas/presupuesto-partidas.service';
@Component({
selector: 'app-list-comunidad',
templateUrl: './list-comunidad.component.html',
styleUrls: ['./list-comunidad.component.css']
})
export class ListComunidadComponent implements OnInit {
idRecuperado: number;
totalSuma: number = 0;
dataSource: MatTableDataSource<PresupuestoPartidas>;
claPre: PartidasPresupuestarias;
partida!: CatalogoPP[];
nombrePartida: string;
politicas: any[] = [];
objetivos: any[] = [];
presupuestoPartidas!: PresupuestoPartidas[];
constructor(
private presupuestoPartidasService: PresupuestoPartidasService,
private id_Compartido: Compartir_idService,
private dialog: MatDialog,
private datosCompartidos: Actualiza_datosService,
) {
this.claPre = new PartidasPresupuestarias();
this.dataSource = new MatTableDataSource<PresupuestoPartidas>([]);
}
ngOnInit(): void {
this.idRecuperado = parseInt(localStorage.getItem('proyectoId'),10);
this.datosCompartidos.datos$.subscribe(() => {
this.obtenerRegistros();
});
this.presupuestoPartidasService.parametrosActualizados.subscribe(() => {
this.obtenerRegistros();
});
}
getSubgrupo3(item: any): string {
return (
item.uzytclasificador_presup_id +
'. ' +
(item.uzytclasificador_presup_nombre || '')
);
}
obtenerRegistros() {
if (this.idRecuperado !== undefined) {
this.presupuestoPartidasService.obtenerRegistrosRelacionadosComunidadProyecto(this.idRecuperado).subscribe(data => {
if (data !== undefined) {
this.presupuestoPartidas = data;
this.dataSource.data = this.presupuestoPartidas;
// Calcular los totales
this.calcularTotales();
// Fetch the names for the given uzytavclaspre_id
}
});
}
}
calcularTotales() {
this.totalSuma = this.presupuestoPartidas.reduce((total, dato) => {
return total + dato.uzytavpresup_valor * dato.uzytavpresup_cantidad;
}, 0);
this.totalSuma = parseFloat(this.totalSuma.toFixed(2));
}
eliminarParametros(id: number) {
const confirmacion = confirm('¿Desea eliminar el registro?');
if (confirmacion) {
this.presupuestoPartidasService.eliminarParametros(id).subscribe(
(response) => {
console.log('El registro se ha eliminado exitosamente.');
this.obtenerRegistros(); // Refresh the records after successful deletion
},
(error) => {
console.log('Error during the treatment of the record', error);
}
);
}
}
}
table {
width: 100%;
}
/* Estilos generales */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.sinborder {
text-align: center;
font-weight: bold;
}
.General th {
padding: 10px;
border: 1px solid black;
font-weight: bold;
background-color: #b6b6b6
}
.Duracion th {
padding: 4px;
border: 1px solid black;
font-weight: bold;
background-color: #b6b6b6
}
.encabezado table {
width: 100%;
border-collapse: collapse;
}
.encabezado td {
padding: 10px;
border: 1px solid black;
}
.encabezado .image-cell img {
max-width: 100px;
height: auto;
}
.encabezado .center-cell {
text-align: center;
font-weight: bold;
}
/* Estilos para la tabla de detalles */
.detalle-table {
margin-top: 20px;
width: 100%;
border-collapse: collapse;
}
.detalle-table td {
padding: 5px;
border: 1px solid black;
}
.detalle-table .codigo-cell {
width: 30%;
font-weight: bold;
}
/* Estilos para el pie de página */
.pie {
margin-top: 20px;
text-align: center;
font-size: 12px;
}
.Column {
padding-left: 0px;
padding-right: 0px;
width: 100px;
white-space: inherit;
}
.Column1 negrita {
font-weight: bold;
}
.Column1 {
padding-left: 0px;
padding-right: 0px;
width: 10px;
white-space: normal;
overflow: visible;
}
.Column2 {
width: 25px;
padding-left: 0px;
padding-right: 0px;
}
.label-negrita {
font-weight: bold;
margin-right: 10px;
margin-top: 10px;
}
.div-container {
display: flex;
align-items: center;
padding: 0%;
}
.container {
padding: 0%;
margin: none;
}
.Marco_Lógico tr {
border: 5px;
}
.containerActividades {
padding: 0%;
border-left: 15px;
}
.container tr {
border-top: 3%;
border-width: 3%;
}
.separa {
margin-top: 3%;
}
.grid-container {
display: grid;
grid-template-columns: 5% 10% 45% 10% 5% 10% 15%;
border: 1px solid #ccc;
}
table,
th,
tr,
td {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
.mat-elevation-z8 table {
border-collapse: collapse;
width: 100%;
}
.mat-elevation-z8 th,
.mat-elevation-z8 td {
border: 1px solid black;
text-align: left;
}
.mat-elevation-z8 th {
background-color: #f2f2f2;
}
\ No newline at end of file
<div class="container">
<table>
<tr class="Duracion">
<th colspan="8">Aporte de la Entidad Auspiciante </th>
</tr>
</table>
<table>
<tr class="Duracion">
<th class="Column1 negrita">Nro</th>
<th class="Column negrita">Bien y/o Servicio</th>
<th class="Column negrita">Descripción</th>
<th class="Column negrita">Cantidad</th>
<th class="Column negrita">Valor Unitario USD</th>
<th class="Column negrita">Total USD</th>
</tr>
<!-- Lógica de iteración para llenar la tabla -->
<tr *ngFor="let datos of presupuestoPartidas; let i = index">
<td class="Column1">{{ i + 1 }}</td>
<td class="Column">{{ datos.uzytavpresup_bien_servicio }}</td>
<td class="Column">{{ datos.uzytavpresup_esptecnic }}</td>
<td class="Column">{{ datos.uzytavpresup_cantidad }}</td>
<td class="Column">{{ datos.uzytavpresup_valor }}</td>
<td class="Column">{{ (datos.uzytavpresup_valor * datos.uzytavpresup_cantidad) | number:'1.2-2' }}</td>
</tr>
<tr colspan="4">
<th> Total: </th>
<th colspan="5" style="text-align: center;"> {{totalSuma}} </th>
</tr>
<!-- Fin de la iteración -->
</table>
</div>
\ No newline at end of file
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { ListEntidadComponent } from './list-entidad.component';
describe('ListEntidadComponent', () => {
let component: ListEntidadComponent;
let fixture: ComponentFixture<ListEntidadComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ListEntidadComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ListEntidadComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatTable, MatTableDataSource } from '@angular/material/table';
import { CatalogoPP } from 'src/app/modules/main/Models/catalogo-partidas-presupuestarias';
import { PartidasPresupuestarias } from 'src/app/modules/main/Models/partidas-presupuestarias';
import { PresupuestoPartidas } from 'src/app/modules/main/Models/presupuesto-partidas';
import { Actualiza_datosService } from 'src/app/modules/main/services/actualiza_datos/actualiza_datos.service';
import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service';
import { PresupuestoPartidasService } from 'src/app/modules/main/services/presupuesto-partidas/presupuesto-partidas.service';
@Component({
selector: 'app-list-entidad',
templateUrl: './list-entidad.component.html',
styleUrls: ['./list-entidad.component.css']
})
export class ListEntidadComponent implements OnInit {
idRecuperado: number;
totalSuma: number = 0;
dataSource: MatTableDataSource<PresupuestoPartidas>;
claPre: PartidasPresupuestarias;
partida!: CatalogoPP[];
nombrePartida: string;
politicas: any[] = [];
objetivos: any[] = [];
presupuestoPartidas!: PresupuestoPartidas[];
@ViewChild(MatTable) table: MatTable<any>;
constructor(
private presupuestoPartidasService: PresupuestoPartidasService,
private id_Compartido: Compartir_idService,
private dialog: MatDialog,
private datosCompartidos: Actualiza_datosService,
) {
this.claPre = new PartidasPresupuestarias();
this.dataSource = new MatTableDataSource<PresupuestoPartidas>([]);
}
ngOnInit(): void {
this.idRecuperado = parseInt(localStorage.getItem('proyectoId'),10);
this.datosCompartidos.datos$.subscribe(() => {
this.obtenerRegistros();
});
this.presupuestoPartidasService.parametrosActualizados.subscribe(() => {
this.obtenerRegistros();
});
}
getSubgrupo3(item: any): string {
return (
item.uzytclasificador_presup_id +
'. ' +
(item.uzytclasificador_presup_nombre || '')
);
}
obtenerRegistros() {
this.idRecuperado = this.idRecuperado;
if (this.idRecuperado !== undefined) {
this.presupuestoPartidasService.obtenerRegistrosRelacionadosEntidadProyecto(this.idRecuperado).subscribe(data => {
if (data !== undefined) {
this.presupuestoPartidas = data;
this.dataSource.data = this.presupuestoPartidas;
// Calcular los totales
this.calcularTotales();
// Fetch the names for the given uzytavclaspre_id
}
});
}
}
calcularTotales() {
this.totalSuma = this.presupuestoPartidas.reduce((total, dato) => {
return total + dato.uzytavpresup_valor * dato.uzytavpresup_cantidad;
}, 0);
this.totalSuma = parseFloat(this.totalSuma.toFixed(2));
}
eliminarParametros(id: number) {
const confirmacion = confirm('¿Desea eliminar el registro?');
if (confirmacion) {
this.presupuestoPartidasService.eliminarParametros(id).subscribe(
(response) => {
console.log('El registro se ha eliminado exitosamente.');
this.obtenerRegistros(); // Refresh the records after successful deletion
},
(error) => {
console.log('Error during the treatment of the record', error);
}
);
}
}
}
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<!--Datos generales internos--> <!--Datos generales internos-->
<app-edit-datos-generales-proyecto></app-edit-datos-generales-proyecto> <app-edit-datos-generales-proyecto [id]="id_d"></app-edit-datos-generales-proyecto>
<!--fin--> <!--fin-->
</mat-expansion-panel> </mat-expansion-panel>
...@@ -447,7 +447,7 @@ ...@@ -447,7 +447,7 @@
Ver y descargar PDF. Ver y descargar PDF.
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<!-- <vex-pdf></vex-pdf> --> <app-pdf></app-pdf>
<!--fin--> <!--fin-->
</mat-expansion-panel> </mat-expansion-panel>
...@@ -543,7 +543,8 @@ ...@@ -543,7 +543,8 @@
1.- Informes de avance 1.- Informes de avance
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<vex-edit-informe></vex-edit-informe>
<vex-list-informe></vex-list-informe>
<!--fin--> <!--fin-->
</mat-expansion-panel> </mat-expansion-panel>
...@@ -637,7 +638,9 @@ ...@@ -637,7 +638,9 @@
3.- Presupuesto ejecutado 3.- Presupuesto ejecutado
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<app-aporte-uni-ejec></app-aporte-uni-ejec>
<app-aporte-ent-ejec></app-aporte-ent-ejec>
<app-aporte-com-ejec></app-aporte-com-ejec>
<!--fin--> <!--fin-->
</mat-expansion-panel> </mat-expansion-panel>
......
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service'; import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/compartir_id.service';
@Component({ @Component({
...@@ -7,7 +7,6 @@ import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/ ...@@ -7,7 +7,6 @@ import { Compartir_idService } from 'src/app/modules/main/services/compartir_id/
styleUrls: ['./edit-proyecto.component.css'] styleUrls: ['./edit-proyecto.component.css']
}) })
export class EditProyectoComponent implements OnInit { export class EditProyectoComponent implements OnInit {
contraccion = false; contraccion = false;
mostraContraccion = false; mostraContraccion = false;
mostrarFormulario: boolean = false; mostrarFormulario: boolean = false;
...@@ -18,7 +17,7 @@ export class EditProyectoComponent implements OnInit { ...@@ -18,7 +17,7 @@ export class EditProyectoComponent implements OnInit {
mostrarPresupuestoDetallado: boolean = false; mostrarPresupuestoDetallado: boolean = false;
mostrarCompro: boolean = false; mostrarCompro: boolean = false;
mostrarEstra: boolean = false; mostrarEstra: boolean = false;
id_d: number = 19;
idRecu: number; idRecu: number;
constructor(private router: Router, constructor(private router: Router,
private idCompartid: Compartir_idService) { private idCompartid: Compartir_idService) {
...@@ -26,7 +25,6 @@ export class EditProyectoComponent implements OnInit { ...@@ -26,7 +25,6 @@ export class EditProyectoComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.idRecu = parseInt(localStorage.getItem('proyectoId'),10); this.idRecu = parseInt(localStorage.getItem('proyectoId'),10);
localStorage.setItem('proyectoId',this.idRecu.toString());
} }
......
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.modal-content {
background-color: white;
padding: 20px;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
max-width: 400px;
width: 100%;
text-align: center;
position: relative;
}
.success-icon {
font-size: 80px;
color: #006400;
margin-right: 1em;
}
.modal-content p {
margin-bottom: 20px;
}
.modal-content button {
background-color: #2196f3;
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
}
.modal-content button:hover {
background-color: #0c7cd5;
}
<div class="modal">
<div class="modal-content">
<p>
La información excede el maximo de caracteres</p>
<button mat-button (click)="closeModal()">Cerrar</button>
</div>
</div>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ErrorTextoComponent } from './error-texto.component';
describe('ErrorTextoComponent', () => {
let component: ErrorTextoComponent;
let fixture: ComponentFixture<ErrorTextoComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ErrorTextoComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(ErrorTextoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
@Component({
selector: 'vex-error-texto',
templateUrl: './error-texto.component.html',
styleUrls: ['./error-texto.component.css']
})
export class ErrorTextoComponent implements OnInit {
formularioEnviado = true;
constructor(
private dialogRef: MatDialogRef<ErrorTextoComponent>
) { }
ngOnInit(): void {
}
closeModal() {
this.dialogRef.close();
}
}
...@@ -136,6 +136,7 @@ export class ListaProyectosComponent implements OnInit { ...@@ -136,6 +136,7 @@ export class ListaProyectosComponent implements OnInit {
agregarP() { agregarP() {
this.router.navigate(['main/Proyecto-Inicial']); this.router.navigate(['main/Proyecto-Inicial']);
} }
editar(id: number) { editar(id: number) {
const registroSeleccionado = this.proyectos.find( const registroSeleccionado = this.proyectos.find(
proyectoFind => proyectoFind.uzytavproyec_id === id proyectoFind => proyectoFind.uzytavproyec_id === id
......
...@@ -113,6 +113,7 @@ body { ...@@ -113,6 +113,7 @@ body {
.container { .container {
padding: 0%; padding: 0%;
margin: none;
} }
.Marco_Lógico tr { .Marco_Lógico tr {
......
import { ComponentFixture, TestBed } from '@angular/core/testing'; /* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { PdfComponent } from './pdf.component'; import { PdfComponent } from './pdf.component';
...@@ -6,12 +9,14 @@ describe('PdfComponent', () => { ...@@ -6,12 +9,14 @@ describe('PdfComponent', () => {
let component: PdfComponent; let component: PdfComponent;
let fixture: ComponentFixture<PdfComponent>; let fixture: ComponentFixture<PdfComponent>;
beforeEach(async () => { beforeEach(async(() => {
await TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ PdfComponent ] declarations: [ PdfComponent ]
}) })
.compileComponents(); .compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PdfComponent); fixture = TestBed.createComponent(PdfComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
......
...@@ -124,8 +124,7 @@ ...@@ -124,8 +124,7 @@
text-transform: uppercase; text-transform: uppercase;
} }
table td {
}
table td::after { table td::after {
content: ""; content: "";
...@@ -192,4 +191,3 @@ ...@@ -192,4 +191,3 @@
fill: blue; fill: blue;
} }
\ No newline at end of file
.principal {
width: 100%; /* Cambia el ancho al 100% */
margin: 0; /* Elimina los márgenes para ocupar todo el espacio disponible */
border-collapse: collapse;
}
.principal th,
.principal td {
width: auto; /* Ajusta el ancho de las celdas automáticamente */
}
.titulo {
display: flex;
align-items: center;
}
.titulo-texto {
font-weight: bold;
font-size: 15px;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
margin-right: 10px;
}
.rounder-nuevo {
border-radius: 50%;
background-color: rgb(71, 127, 75);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
width: 30px;
height: 30px;
border: none;
outline: none;
cursor: pointer;
margin-left: 5px;
}
.opciones {
margin: 0% 3% 0% 3%;
min-height: 50px;
}
.grid-item {
font-weight: bold;
min-height: 50px;
}
.datos {
min-height: 50px;
}
.ng-hide {
display: none;
}
#cabecera {
background: linear-gradient(135deg,
var(--background-base) 22px,
var(--background-hover) 22px,
var(--background-hover) 24px,
transparent 24px,
transparent 67px,
var(--background-hover) 67px,
var(--background-hover) 69px,
transparent 69px),
linear-gradient(225deg,
var(--background-base) 22px,
var(--background-hover) 22px,
var(--background-hover) 24px,
transparent 24px,
transparent 67px,
var(--background-hover) 67px,
var(--background-hover) 69px,
transparent 69px) 0 64px;
background-color: var(--background-base);
background-size: 64px 128px;
}
.azul svg {
fill: blue;
}
.card {
background-color: rgb(252, 252, 251)
}
.icono-instituciones {
display: flex;
align-items: center;
justify-content: center;
margin-right: 5px;
font-size: 20px;
cursor: pointer;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
font-family: 'Roboto', sans-serif;
color: #333;
}
table th,
table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e0e0e0;
}
table th {
background-color: rgb(248, 249, 250);
font-weight: bold;
text-transform: uppercase;
}
table td::after {
content: "";
bottom: -1px;
left: 0;
width: 100%;
height: 1px;
background-color: #e0e0e0;
}
input[type="text"] {
width: 200px;
padding: 8px;
border: 1px solid #ccc;
border-radius: 5px;
margin-left: 10px;
}
.area-busqueda {
padding: 10px;
margin-top: 3%;
text-align: right;
background-color: rgb(248, 249, 250);
}
@media (max-width: 600px) {
table {
font-size: 14px;
}
table th,
table td {
padding: 8px;
}
}
.btn-observar {
border-radius: 50%;
width: 36px;
height: 36px;
}
.colorsito{
background-color: rgb(248, 249, 250);
}
.white-icon {
color: white;
}
.azul{
color:blue
}
.colorEditar {
color: blue;
}
.colorEditar svg {
fill: blue;
}
<table class="principal">
<thead class="colorsito">
<tr>
<th class="colorsito">Nombres</th>
<th class="colorsito">Apellidos</th>
<th class="colorsito">E-mail</th>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let opciones of integrantesComision; let i = index">
<tr>
<td>{{ usuario[opciones.uzytusuario_id_asignado]?.uzytusuario_nombres }}</td>
<td>{{ usuario[opciones.uzytusuario_id_asignado]?.uzytusuario_apellidos }}</td>
<td>{{ usuario[opciones.uzytusuario_id_asignado]?.uzytusuario_email_institucional }}</td>
</tr>
</ng-container>
</tbody>
</table>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ComisionAsigComponent } from './comision-asig.component';
describe('ComisionAsigComponent', () => {
let component: ComisionAsigComponent;
let fixture: ComponentFixture<ComisionAsigComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ComisionAsigComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(ComisionAsigComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, Input, OnInit } from '@angular/core';
import { IntegrantesComision } from '../../../Models/Comision de evaluacion/integrantes-comision';
import { Subscription } from 'rxjs';
import { IntegrantesComisionService } from '../../../services/integrantes-comision/integrantes-comision.service';
import { UsuariosService } from '../../../services/usuarios/usuarios.service';
@Component({
selector: 'vex-comision-asig',
templateUrl: './comision-asig.component.html',
styleUrls: ['./comision-asig.component.css']
})
export class ComisionAsigComponent implements OnInit {
@Input() idProp: number;
usuario: any = {};
integrantesComision!: IntegrantesComision[];
parametrosSubscription: Subscription;
constructor(
private integrantesComisionService: IntegrantesComisionService,
private usuariosService: UsuariosService,
) { }
ngOnInit() {
this.obtenerRegistros(this.idProp);
}
obtenerRegistros(id:number) {
this.integrantesComisionService.obtenerDatos(id).subscribe(data => {
this.integrantesComision = data.map(parametro => {
parametro.uzytavdetcomca_fech_crea = new Date(parametro.uzytavdetcomca_fech_crea);
this.obtenerUsuarios(parametro.uzytusuario_id_asignado)
return parametro;
});
});
}
obtenerUsuarios(id: number) {
this.usuariosService.obtenerUsuariosId(id).subscribe(data => {
this.usuario[id] = data;
});
}
}
<div class="contenedorP"> <div class="contenedorP" *ngIf="shouldShowDiv">
<div> <div>
<form [formGroup]="myForm" (ngSubmit)="onUpdate()"> <form [formGroup]="myForm" (ngSubmit)="onUpdate()">
<mat-label><strong>Asignar la comisión de Evaluación</strong></mat-label> <mat-label><strong>Asignar la comisión de Evaluación</strong></mat-label>
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
[disabled]="!myForm.valid">Agregar [disabled]="!myForm.valid">Agregar
Fecha</button> Fecha</button>
<span class="separator"></span> <span class="separator"></span>
<button mat-raised-button color="warn"
(click)="cancelarF()">Cancelar</button>
</div> </div>
<div class="separator2"></div> <div class="separator2"></div>
<!--fecha de inicio--> <!--fecha de inicio-->
...@@ -39,38 +37,41 @@ ...@@ -39,38 +37,41 @@
</div> </div>
<div class="container"> <div class="container">
<div class="mat-elevation-z8"> <div>
<mat-card class="card">
<table mat-table [dataSource]="dataSource" matSort> <table>
<thead class="colorsito">
<!-- Nro Column --> <tr>
<ng-container matColumnDef="Nro" class="Column1"> <th class="colorsito"></th>
<th class="Column1 negrita" mat-header-cell *matHeaderCellDef <th class="colorsito">Comsión de Evaluación Asignada para la evalucaión</th>
mat-sort-header> Nro </th> </tr>
<td class="Column1" mat-cell *matCellDef="let i = index"> {{ i+1 }} </thead>
<tbody>
<ng-container *ngFor="let parametro of datos; let i = index">
<tr id="fila-{{ i }}">
<td>
<button (click)="parametro.uzytavcabcomca_id !== null && toggleDiv(i)">
<mat-icon>{{ mostrarDiv[i] ? 'keyboard_arrow_down' : 'keyboard_arrow_right' }}</mat-icon>
</button>
</td> </td>
<td>
<ng-container *ngIf="parametro.uzytavcabcomca_id !== null; else noComision">
{{ getNombrePar(parametro.uzytavcabcomca_id) }}
</ng-container> </ng-container>
<ng-template #noComision>
<ng-container matColumnDef="cedula" class="Column"> No se ha asignado Comisión de Evaluación
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header> </ng-template>
Cedula </th> </td>
<td class="Column" mat-cell *matCellDef="let dato"> {{dato.uzytavinstproy_dir_discapacidad}} </td> </tr>
</ng-container> <tr *ngIf="mostrarDiv[i]">
<div></div>
<ng-container matColumnDef="info" class="Column"> <td colspan="5">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header> <vex-comision-asig [idProp]="this.parametro.uzytavcabcomca_id"></vex-comision-asig>
Nombre y Apellidos </th> </td>
<td class="Column" mat-cell *matCellDef="let dato"> {{dato.uzytavinstproy_DIRECTOS}} </td> </tr>
</ng-container>
<ng-container matColumnDef="correo" class="Column">
<th class="Column" mat-header-cell *matHeaderCellDef mat-sort-header>
Correo Electronico </th>
<td class="Column" mat-cell *matCellDef="let dato"> {{dato.uzytavinstproy_TOTAL}} </td>
</ng-container> </ng-container>
</tbody>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
</mat-card>
</div> </div>
</div> </div>
/* tslint:disable:no-unused-variable */
import { TestBed, async, inject } from '@angular/core/testing';
import { HitosService } from './hitos.service';
describe('Service: Hitos', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [HitosService]
});
});
it('should ...', inject([HitosService], (service: HitosService) => {
expect(service).toBeTruthy();
}));
});
This diff is collapsed.
...@@ -44,4 +44,8 @@ export class PresupuestoPartidasService { ...@@ -44,4 +44,8 @@ export class PresupuestoPartidasService {
return this.httpClient.get<PresupuestoPartidas[]>(`${this.URL_RELA_PROYEC_COMUNIDAD}/${id}`); return this.httpClient.get<PresupuestoPartidas[]>(`${this.URL_RELA_PROYEC_COMUNIDAD}/${id}`);
} }
modificarParametros(id: number, parametros: PresupuestoPartidas): Observable<any> {
return this.httpClient.put<any>(`${this.URL}/editar/${id}`, parametros);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment