Jelajahi Sumber

Avances panel de control

Jose Brito 1 tahun lalu
induk
melakukan
d85bd02716
14 mengubah file dengan 482 tambahan dan 14 penghapusan
  1. 4 0
      sistema-mantenimiento-front/src/app/app-routing.module.ts
  2. 4 0
      sistema-mantenimiento-front/src/app/app.module.ts
  3. 21 0
      sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-election-config/data-election-config.component.css
  4. 70 0
      sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-election-config/data-election-config.component.html
  5. 23 0
      sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-election-config/data-election-config.component.spec.ts
  6. 120 0
      sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-election-config/data-election-config.component.ts
  7. 0 0
      sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-export-selection.component.css
  8. 77 0
      sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-export-selection.component.html
  9. 23 0
      sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-export-selection.component.spec.ts
  10. 123 0
      sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-export-selection.component.ts
  11. 1 1
      sistema-mantenimiento-front/src/app/components/gdel/addo/addo.component.ts
  12. 1 1
      sistema-mantenimiento-front/src/app/components/system-admin/advices/new-advice/new-advice.component.ts
  13. 3 3
      sistema-mantenimiento-front/src/app/components/users-profiles/profiles-admin/profiles-admin.component.ts
  14. 12 9
      sistema-mantenimiento-front/src/app/interfaces/profiles.interface.ts

+ 4 - 0
sistema-mantenimiento-front/src/app/app-routing.module.ts

@@ -194,6 +194,8 @@ import { AddElementsComponent } from './components/control-panel/graphic-interfa
 import { ControlPanelPreviewComponent } from './components/control-panel/graphic-interface-indicators/control-panel-preview/control-panel-preview.component';
 import { BroadcastListsComponent } from './components/control-panel/broadcast-lists/broadcast-lists.component';
 import { FormsManagementFormComponent } from './components/forms-management/forms-management-form/forms-management-form.component';
+import { DataExportSelectionComponent } from './components/control-panel/data-export-selection/data-export-selection.component';
+import { DataElectionConfigComponent } from './components/control-panel/data-export-selection/data-election-config/data-election-config.component';
 
 const routes: Routes = [
   { path: '', redirectTo: '/login', pathMatch: 'full' },
@@ -406,6 +408,8 @@ const routes: Routes = [
       { path: 'PCSA/MIIG/add-elements', component: AddElementsComponent },
       { path: 'PCSA/MIIG/panel-preview', component: ControlPanelPreviewComponent },
       { path: 'PCSA/CLDI', component: BroadcastListsComponent },
+      { path: 'PCSA/EDES', component: DataExportSelectionComponent },
+      { path: 'PCSA/EDES/data-election-config', component: DataElectionConfigComponent },
       // Gestión presupuestaria
       { path: 'GEPE', component: BudgetManagementComponent },
       { path: 'GEPE/CACO', component: AccountingBurdensComponent },

+ 4 - 0
sistema-mantenimiento-front/src/app/app.module.ts

@@ -486,6 +486,8 @@ import { BroadcastListsComponent } from './components/control-panel/broadcast-li
 import { BroadcastListFormComponent } from './components/control-panel/broadcast-lists/broadcast-list-form/broadcast-list-form.component';
 import { FormsManagementFormComponent } from './components/forms-management/forms-management-form/forms-management-form.component';
 import { ConfigurateInputComponent } from './components/forms-management/forms-management-form/configurate-input/configurate-input.component';
+import { DataExportSelectionComponent } from './components/control-panel/data-export-selection/data-export-selection.component';
+import { DataElectionConfigComponent } from './components/control-panel/data-export-selection/data-election-config/data-election-config.component';
 
 @NgModule({
   declarations: [
@@ -856,6 +858,8 @@ import { ConfigurateInputComponent } from './components/forms-management/forms-m
     BroadcastListFormComponent,
     FormsManagementFormComponent,
     ConfigurateInputComponent,
+    DataExportSelectionComponent,
+    DataElectionConfigComponent,
   ],
   imports: [
     MatMomentDateModule,

+ 21 - 0
sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-election-config/data-election-config.component.css

@@ -0,0 +1,21 @@
+.item-permissions{
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.item-permissions .title{
+  font-weight: 500;
+  font-size: 16px;
+  color: rgba(0, 0, 0, 0.64);
+}
+
+.form-cell:not(:last-child){
+  margin-bottom: 4px;
+}
+
+.item-permissions mat-slide-toggle{
+  margin-right: 4px;
+}

+ 70 - 0
sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-election-config/data-election-config.component.html

@@ -0,0 +1,70 @@
+<div class="animated fadeIn prevent-select" (window:resize)="onResize()" [ngClass]="{ items_container: screenSize > 640, 
+items_container_full_width: screenSize <= 640 }">
+  <div id="navigation" class="mb-8">
+    <div class="prev-page prevent-select indigo_primary_background mat-elevation-z8" (click)="goBack(1)" matRipple>
+      <mat-icon style="color: white;">arrow_back</mat-icon>
+      <div class="page-name ml-4">Elección de datos a exportar según el nivel de acceso</div>
+    </div>
+  </div>
+  <mat-card style="width: 100%; height: 100%;" [ngClass]="{ override_elevation_z8: screenSize > 640, override_elevation_z0: screenSize <= 640 }">
+    <mat-card-title style="text-align: center; margin: 15px 0;">Elección de exportación de datos</mat-card-title>
+    <mat-card-content>
+      <div class="form-order-container" *ngIf="isLoading">
+        <div class="is-loading animated fadeIn fast">
+          <mat-spinner align="center"></mat-spinner>
+          <h3>Cargando datos ...</h3>
+        </div>
+      </div>
+
+      <div class="form-order-container" *ngIf="!isLoading && hasError">
+        <div class="is-loading animated fadeIn fast">
+          <mat-icon class="red_primary_font mb-40" style="transform: scale(4.5);">error</mat-icon>
+          <h3>{{ errorStr }}</h3>
+        </div>
+      </div>
+
+      <div class="form-order-container animated fadeIn pt-2" *ngIf="!isLoading && !hasError">
+        <div class="form-column" style="box-sizing: border-box;">
+          <div class="form-row">
+            <div class="form-cell C12" *ngFor="let module of permissions">
+              <div class="item-permissions">
+                <div class="title">{{ module.id }} - {{ module.name }}</div>
+                <mat-slide-toggle>Permitir exportar</mat-slide-toggle>
+              </div>
+              <div class="form-column mt-4 pl-16" *ngIf="module.children.length > 0" style="box-sizing: border-box;">
+                <div class="form-row">
+                  <div class="form-cell C12" *ngFor="let submodule of module.children">
+                    <div class="item-permissions">
+                      <div class="title">{{ submodule.id }} - {{ submodule.name }}</div>
+                      <mat-slide-toggle>Permitir exportar</mat-slide-toggle>
+                    </div>
+                    <div class="form-column mt-4 pl-16" *ngIf="submodule.children.length > 0" style="box-sizing: border-box;">
+                      <div class="form-row">
+                        <div class="form-cell C12" *ngFor="let funct of submodule.children">
+                          <div class="item-permissions">
+                            <div class="title">{{ funct.id }} - {{ funct.name }}</div>
+                            <mat-slide-toggle>Permitir exportar</mat-slide-toggle>
+                          </div>
+                          <div class="form-column mt-4 pl-16" *ngIf="funct.children != undefined && funct.children.length > 0" style="box-sizing: border-box;">
+                            <div class="form-row">
+                              <div class="form-cell C12" *ngFor="let screen of funct.children">
+                                <div class="item-permissions">
+                                  <div class="title">{{ screen.id }} - {{ screen.name }}</div>
+                                  <mat-slide-toggle>Permitir exportar</mat-slide-toggle>
+                                </div>
+                              </div>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </mat-card-content>
+  </mat-card>
+</div>

+ 23 - 0
sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-election-config/data-election-config.component.spec.ts

@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DataElectionConfigComponent } from './data-election-config.component';
+
+describe('DataElectionConfigComponent', () => {
+  let component: DataElectionConfigComponent;
+  let fixture: ComponentFixture<DataElectionConfigComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [DataElectionConfigComponent]
+    })
+    .compileComponents();
+    
+    fixture = TestBed.createComponent(DataElectionConfigComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 120 - 0
sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-election-config/data-election-config.component.ts

@@ -0,0 +1,120 @@
+import { Component, OnInit } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
+import { lastValueFrom } from 'rxjs';
+import { PermissionsInterface } from 'src/app/interfaces/permissions.interface';
+import { ProfileInterface } from 'src/app/interfaces/profile.interface';
+import { EncService } from 'src/app/services/enc/enc.service';
+import { ResourcesService } from 'src/app/services/resources/resources.service';
+import { UsersProfilesService } from 'src/app/services/users-profiles.service';
+
+@Component({
+  selector: 'app-data-election-config',
+  templateUrl: './data-election-config.component.html',
+  styleUrl: './data-election-config.component.css'
+})
+export class DataElectionConfigComponent implements OnInit {
+  screenSize: number;
+  isLoading: boolean;
+  hasError: boolean;
+  errorStr: string;
+
+  permissions: PermissionsInterface[];
+  exportPermissions: Map<string, boolean>;
+
+  constructor(
+    private _activatedRoute: ActivatedRoute,
+    private _resourcesService: ResourcesService,
+    private _usersProfilesService: UsersProfilesService,
+    private _encService: EncService,
+  ) {
+    this.screenSize = window.innerWidth;
+    this.isLoading = true;
+    this.hasError = false;
+    this.errorStr = '';
+
+    this.permissions = [];
+    this.exportPermissions = new Map();
+  }
+
+  ngOnInit(): void {
+    this._activatedRoute.queryParams.subscribe(params => {
+      let idProfile = params['data'];
+      if(idProfile == undefined){
+        this._resourcesService.openSnackBar('No se envió información.');
+        this.goBack(1);
+      }else{
+        this.getProfile(idProfile);
+      }
+    });
+  }
+
+  goBack(steps: number){
+    window.history.go(steps * -1);
+  }
+
+  onResize():void{
+    this.screenSize = window.innerWidth;
+  }
+
+  async getProfile(idProfile: string){
+    try{
+      let idUser = localStorage.getItem('idusuario')!;
+      let profile: ProfileInterface = await lastValueFrom(this._usersProfilesService.getProfile(idProfile, idUser, 1));
+
+      this.hasError = profile.error;
+      this.errorStr = profile.msg;
+
+      if(!this.hasError){
+        let permissionsArr: PermissionsInterface[] = [];
+        for(const permission of profile.response.PERMISOS.permissions){
+          permission.id = await this._encService.decrypt(permission.id);
+
+          let children: PermissionsInterface[] = [];
+          if(permission.children.length > 0){
+            children = await this.processChildren(permission.children);
+            permission.children = children;
+          }
+
+          if(permission.access > 0){
+            permissionsArr.push(permission);
+            this.exportPermissions.set(permission.id, false);
+          }
+        }
+
+        this.permissions = permissionsArr;
+      }
+
+      this.isLoading = false;
+    }catch(error: any){
+      if(error.error == undefined){
+        this.errorStr = 'Ocurrió un error inesperado.';
+      }else if(error.error.msg == undefined){
+        this.errorStr = 'Ocurrió un error inesperado.';
+      }else{
+        this.errorStr = error.error.msg;
+      }
+
+      this.hasError = true;
+      this.isLoading = false;
+    }
+  }
+
+  async processChildren(children: PermissionsInterface[]): Promise<PermissionsInterface[]>{
+    let childrenFn: PermissionsInterface[] = [];
+    for(const permission of children){
+      permission.id = await this._encService.decrypt(permission.id);
+
+      let grandChildren: PermissionsInterface[] = [];
+      if(permission.children != undefined){
+        grandChildren = await this.processChildren(permission.children);
+        permission.children = grandChildren;
+      }
+      
+      if(permission.access > 0){
+        childrenFn.push(permission);
+      }
+    }
+    
+    return childrenFn;
+  }
+}

+ 0 - 0
sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-export-selection.component.css


+ 77 - 0
sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-export-selection.component.html

@@ -0,0 +1,77 @@
+<main class="main-container animated fadeIn prevent-select" (window:resize)="onResize()">
+
+  <header id="navigation" class="btn-navigate mb-8">
+    <div class="prev-page prevent-select indigo_primary_background mat-elevation-z8" [routerLink]="['/sam/PCSA']" matRipple>
+      <mat-icon style="color: white;">arrow_back</mat-icon>
+      <div class="page-name ml-4">Panel de control y seguimiento de actividades</div>
+    </div>
+  </header>
+
+  <mat-card class="override-card override-elevation-z8">
+    <section class="override-section">
+      <nav class="override-nav">
+        <mat-card-title class="mat-card-title centre">Elección de datos a exportar según el nivel de acceso</mat-card-title>
+        <div class="override-actions">
+          <mat-form-field appearance="outline" class="w-300p mr-8">
+            <mat-label>Buscador</mat-label>
+            <input matInput [(ngModel)]="txtBuscador" (keyup)="applyFilter($event,'INP')"
+            placeholder="Ingrese la palabra a buscar" />
+            <mat-icon *ngIf="txtBuscador.length === 0" matSuffix>search</mat-icon>
+            <mat-icon *ngIf="txtBuscador.length > 0" class="clickable" matTooltip="Eliminar filtro"
+            (click)="applyFilter('', 'EST')" matSuffix>close</mat-icon>
+          </mat-form-field>
+          <div class="override-buttons">
+            <button mat-mini-fab class="cyan_dark_background white_font override_no_shadow mr-10" matTooltip="Actualizar Datos" (click)="getProfiles()">
+              <mat-icon>refresh</mat-icon>
+            </button>
+          </div>
+        </div>
+      </nav>
+
+      <div class="is-loading animated fadeIn fast" *ngIf="isLoading">
+        <mat-spinner align="center"></mat-spinner>
+        <h3>Cargando datos ...</h3>
+      </div>
+
+      <div class="is-loading animated fadeIn fast" *ngIf="!isLoading && hasError">
+        <mat-icon style="transform: scale(4.5);margin: 45px 0;" class="red_primary_font">error</mat-icon>
+        <h3>{{ errorStr }}</h3>
+      </div>
+
+      <div class="override-table animated fadeIn" [ngClass]="{ hidden: isLoading || hasError }">
+        <table mat-table [dataSource]="dataSource!" matSort 
+        [style.display]="!isLoading && !hasError ? 'revert' : 'none'">
+          <ng-container matColumnDef="PERFIL">
+            <th mat-header-cell *matHeaderCellDef mat-sort-header>Perfil</th>
+            <td mat-cell *matCellDef="let row">{{ row.NOMBREPERFIL }} ({{ row.IDPERFIL }})</td>
+          </ng-container>
+          
+          <ng-container matColumnDef="USUARIOS">
+            <th mat-header-cell *matHeaderCellDef mat-sort-header>Usuarios relacionados</th>
+            <td mat-cell *matCellDef="let row">{{ row.USUARIOS_RELACIONADOS }}</td>
+          </ng-container>
+          
+          <ng-container matColumnDef="ACCIONES">
+            <th mat-header-cell *matHeaderCellDef mat-sort-header>Acciones</th>
+            <td mat-cell *matCellDef="let row">
+              <button mat-mini-fab color="primary" class="override_no_shadow" matTooltip="Configurar elección" (click)="configProfileExportData(row.IDPERFIL)">
+                <mat-icon>fact_check</mat-icon>
+              </button>
+            </td>
+          </ng-container>
+
+          <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
+          <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
+
+          <tr class="mat-row" *matNoDataRow>
+            <td class="mat-cell p-40 centre" colspan="100%">
+              <object data="assets/img/empty_data.svg" class="no-data-image"></object>
+              <h2>Sin datos</h2>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </section>
+    <mat-paginator [pageSizeOptions]="[10, 50, 100]" class="override-paginator"></mat-paginator>
+  </mat-card>
+</main>

+ 23 - 0
sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-export-selection.component.spec.ts

@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DataExportSelectionComponent } from './data-export-selection.component';
+
+describe('DataExportSelectionComponent', () => {
+  let component: DataExportSelectionComponent;
+  let fixture: ComponentFixture<DataExportSelectionComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [DataExportSelectionComponent]
+    })
+    .compileComponents();
+    
+    fixture = TestBed.createComponent(DataExportSelectionComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 123 - 0
sistema-mantenimiento-front/src/app/components/control-panel/data-export-selection/data-export-selection.component.ts

@@ -0,0 +1,123 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { MatPaginator } from '@angular/material/paginator';
+import { MatSort } from '@angular/material/sort';
+import { MatTableDataSource } from '@angular/material/table';
+import { Router } from '@angular/router';
+import { lastValueFrom } from 'rxjs';
+import { ProfileResponse, ProfilesResponse } from 'src/app/interfaces/profiles.interface';
+import { EncService } from 'src/app/services/enc/enc.service';
+import { FunctionsService } from 'src/app/services/functions.service';
+import { UsersProfilesService } from 'src/app/services/users-profiles.service';
+
+@Component({
+  selector: 'app-data-export-selection',
+  templateUrl: './data-export-selection.component.html',
+  styleUrl: './data-export-selection.component.css'
+})
+export class DataExportSelectionComponent implements OnInit {
+  public txtBuscador:string;
+
+  isLoading: boolean;
+  hasError: boolean;
+  errorStr: string;
+
+  dataSource: MatTableDataSource<ProfileResponse>;
+  displayedColumns = ['PERFIL', 'USUARIOS', 'ACCIONES'];
+
+  @ViewChild(MatPaginator) paginator!: MatPaginator;
+  @ViewChild(MatSort) sort!: MatSort;
+
+  constructor(
+    private _usersProfilesService: UsersProfilesService,
+    private _encService: EncService,
+    private _functionsService: FunctionsService,
+    private _router: Router,
+  ) {
+    this.txtBuscador = '';
+
+    this.isLoading = true;
+    this.hasError = false;
+    this.errorStr = '';
+
+    this.dataSource = new MatTableDataSource();
+  }
+
+  ngOnInit(): void {
+    this.getProfiles();
+  }
+
+  public onResize():void {
+
+  }
+
+  applyFilter(event: any, type: string){
+    let filterValue:string;
+    if (type == 'INP') {
+      filterValue = (event.target as HTMLInputElement).value;
+    }else{
+      this.txtBuscador = event;
+      filterValue = event;
+    }
+    this.dataSource!.filter = filterValue.trim().toLowerCase();
+
+    if(this.dataSource?.paginator){
+      this.dataSource.paginator.firstPage();
+    }
+  }
+
+  async getProfiles(){
+    try{
+      this.isLoading = true;
+      this.hasError = false;
+      this.errorStr = '';
+
+      let idUser = localStorage.getItem('idusuario')!;
+      let profiles: ProfilesResponse = await lastValueFrom(this._usersProfilesService.getProfiles(idUser, 1));
+
+      this.hasError = profiles.error;
+      this.errorStr = profiles.msg;
+
+      if(!this.hasError){
+        let profilesArr: ProfileResponse[] = [];
+        for(const profile of profiles.response){
+          profile.IDPERFIL = await this._encService.decrypt(profile.IDPERFIL);
+          profile.FECREG = this._functionsService.orderDate(profile.FECREG);
+
+          if(profile.FECMOD != null){
+            profile.FECMOD = this._functionsService.orderDate(profile.FECMOD);
+          }
+
+          if(profile.ESTADO == 'Activo'){
+            profilesArr.push(profile);
+          }
+        }
+
+        this.dataSource = new MatTableDataSource(profilesArr);
+        this.dataSource.paginator = this.paginator;
+        this.dataSource.sort = this.sort;
+      }
+
+      this.isLoading = false;
+    }catch(error: any){
+      if(error.error == undefined){
+        this.errorStr = 'Ocurrió un error inesperado.';
+      }else if(error.error.msg == undefined){
+        this.errorStr = 'Ocurrió un error inesperado.';
+      }else{
+        this.errorStr = error.error.msg;
+      }
+
+      this.hasError = true;
+      this.isLoading = false;
+    }
+  }
+
+  async configProfileExportData(idProfile: string){
+    let idProfileEnc = await this._encService.encrypt(idProfile);
+    this._router.navigate(['sam/PCSA/EDES/data-election-config'], {
+      queryParams: {
+        data: idProfileEnc,
+      }
+    });
+  }
+}

+ 1 - 1
sistema-mantenimiento-front/src/app/components/gdel/addo/addo.component.ts

@@ -157,7 +157,7 @@ export class ADDOComponent implements OnInit {
               viewValue: profile.NOMBREPERFIL,
             };
 
-            if (profile.ESTATUS != 'Eliminado')
+            if (profile.ESTADO != 'Eliminado')
               profilesGroup.division.push(profileDisplay);
           });
 

+ 1 - 1
sistema-mantenimiento-front/src/app/components/system-admin/advices/new-advice/new-advice.component.ts

@@ -211,7 +211,7 @@ export class NewAdviceComponent implements OnInit {
               viewValue: profile.NOMBREPERFIL
             };
 
-            if(profile.ESTATUS != 'Eliminado') profilesGroup.division.push(profileDisplay);
+            if(profile.ESTADO != 'Eliminado') profilesGroup.division.push(profileDisplay);
           });
 
           this.divisions.push(profilesGroup);

+ 3 - 3
sistema-mantenimiento-front/src/app/components/users-profiles/profiles-admin/profiles-admin.component.ts

@@ -17,7 +17,7 @@ import { UserConsultResponse } from 'src/app/interfaces/user.interface';
 import { ProfileInterface } from 'src/app/interfaces/profile.interface';
 
 interface TableInfo{
-  ID: number,
+  ID: string,
   NOMBRE: string,
   FECHA: string,
   ESTADO: string 
@@ -125,14 +125,14 @@ export class ProfilesAdminComponent implements OnInit {
 
       if(!this.hasError){
         data.response.forEach((item: ProfileResponse) => {
-          let lastDate = item.FECHAMODIFICACION == null || item.FECHAMODIFICACION == undefined ? item.FECHACREACION : item.FECHAMODIFICACION;
+          let lastDate = item.FECMOD == null || item.FECMOD == undefined ? item.FECREG : item.FECREG;
           let formattedDate = this._functionsService.orderDate(lastDate);
           
           let profile: TableInfo = {
             ID: item.IDPERFIL,
             NOMBRE: item.NOMBREPERFIL,
             FECHA: formattedDate!,
-            ESTADO: item.ESTATUS
+            ESTADO: item.ESTADO
           };
           
           this.profiles.push(profile)

+ 12 - 9
sistema-mantenimiento-front/src/app/interfaces/profiles.interface.ts

@@ -1,14 +1,17 @@
 export interface ProfilesResponse{
-    error: boolean;
-    msg: string;
-    response: Array<ProfileResponse>;
+  error: boolean;
+  msg: string;
+  response: Array<ProfileResponse>;
 }
 
 export interface ProfileResponse{
-    IDPERFIL: number;
-    NOMBREPERFIL: string;
-    ESTATUS: string;
-    PERMISOS: string;
-    FECHACREACION: string;
-    FECHAMODIFICACION?: string;
+  IDPERFIL: string;
+  NOMBREPERFIL: string;
+  PERMISOS: string;
+  ESTADO: string;
+  USRREG: string;
+  FECREG: string;
+  USRMOD: string | null;
+  FECMOD: string | null;
+  USUARIOS_RELACIONADOS: number;
 }