-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Merge pull request #4 from udistrital/feature/registro_edicion_…
…usuarios feat: Creacion de la interfaz del microcliente de creación y actualización de usuarios udistrital/sisifo_documentacion#54
- Loading branch information
Showing
15 changed files
with
427 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ export const ROL_ANALISTA = 'ANALISTA'; | |
export const ROL_SOPORTE = 'SOPORTE'; | ||
|
||
|
||
|
75 changes: 75 additions & 0 deletions
75
src/app/modules/gestion-usuarios/actualizar-usuario/actualizar-usuario.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<div class="container-border"> | ||
<h2 class="titulo">Actualizar Usuario(a)</h2> | ||
|
||
<div class="inputs"> | ||
<mat-form-field appearance="fill"> | ||
<mat-label>Documento de identidad:</mat-label> | ||
<input type="text" matInput /> | ||
<mat-icon matSuffix>search</mat-icon> | ||
</mat-form-field> | ||
|
||
<mat-form-field appearance="fill" class="correo"> | ||
<mat-label>Correo:</mat-label> | ||
<input type="text" matInput /> | ||
<mat-icon matSuffix>search</mat-icon> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div class="nombre"> | ||
<mat-form-field appearance="fill"> | ||
<mat-label>Nombres y Apellidos:</mat-label> | ||
<input type="text" matInput /> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div class="selector"> | ||
<mat-form-field class="rol"> | ||
<mat-label>Rol:</mat-label> | ||
<mat-select> | ||
<mat-option mat-option *ngFor="let rol of roles" [value]="rol"> | ||
{{ rol }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<mat-label>Estado:</mat-label> | ||
<mat-select> | ||
<mat-option *ngFor="let estado of estados"[value]="estado"> | ||
{{estado}} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div class="fechas"> | ||
<mat-form-field> | ||
<mat-label>Fecha Inicial Rol:</mat-label> | ||
<input matInput [matDatepicker]="picker1" /> | ||
<mat-datepicker-toggle | ||
matIconSuffix | ||
[for]="picker1" | ||
></mat-datepicker-toggle> | ||
<mat-datepicker #picker1></mat-datepicker> | ||
</mat-form-field> | ||
|
||
<mat-form-field> | ||
<mat-label>Fecha Final Rol:</mat-label> | ||
<input matInput [matDatepicker]="picker2" /> | ||
<mat-datepicker-toggle | ||
matIconSuffix | ||
[for]="picker2" | ||
></mat-datepicker-toggle> | ||
<mat-datepicker #picker2></mat-datepicker> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div class="button-container"> | ||
<button mat-raised-button class="Bcancelar">Cancelar</button> | ||
<button mat-raised-button color="primary">Guardar</button> | ||
</div> | ||
</div> |
58 changes: 58 additions & 0 deletions
58
src/app/modules/gestion-usuarios/actualizar-usuario/actualizar-usuario.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
.inputs{ | ||
display: flex; | ||
gap: 5rem; | ||
max-width: 80%; | ||
} | ||
|
||
.correo{ | ||
width: 300px; | ||
} | ||
|
||
.nombre{ | ||
display: flex; | ||
flex-direction: column; | ||
width: 78%; | ||
max-width: 80%; | ||
} | ||
|
||
.selector{ | ||
display: flex; | ||
gap: 6rem; | ||
|
||
} | ||
|
||
.rol{ | ||
width: 310px; | ||
} | ||
|
||
.container-border { | ||
margin: 10% 10% 10% 10%; | ||
width: 800px; | ||
border: 1px solid var(--primary); | ||
padding: 2% 5%; | ||
border-radius: 50px; | ||
max-width: 1200px; | ||
margin: 3% auto ; | ||
} | ||
|
||
.fechas{ | ||
display: flex; | ||
gap: 8rem; | ||
} | ||
|
||
.button-container { | ||
margin: 1%; | ||
display: flex; | ||
justify-content: flex-end; | ||
align-items: flex-end; | ||
gap: 10px; | ||
} | ||
|
||
.titulo{ | ||
color: var(--primary); | ||
} | ||
|
||
.Bcancelar{ | ||
background-color: var(--danger-base) !important; | ||
color: white !important; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/app/modules/gestion-usuarios/actualizar-usuario/actualizar-usuario.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ActualizarUsuarioComponent } from './actualizar-usuario.component'; | ||
|
||
describe('ActualizarUsuarioComponent', () => { | ||
let component: ActualizarUsuarioComponent; | ||
let fixture: ComponentFixture<ActualizarUsuarioComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ActualizarUsuarioComponent] | ||
}); | ||
fixture = TestBed.createComponent(ActualizarUsuarioComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
26 changes: 26 additions & 0 deletions
26
src/app/modules/gestion-usuarios/actualizar-usuario/actualizar-usuario.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component } from '@angular/core'; | ||
import { ROL_ADMINISTRADOR, ROL_ANALISTA, ROL_AUDITOR, ROL_EJECUTOR, ROL_JEFE, ROL_SOPORTE } from '../../gestion-roles/utils'; | ||
|
||
|
||
@Component({ | ||
selector: 'app-actualizar-usuario', | ||
templateUrl: './actualizar-usuario.component.html', | ||
styleUrls: ['./actualizar-usuario.component.scss'] | ||
}) | ||
export class ActualizarUsuarioComponent { | ||
|
||
roles =[ | ||
ROL_ADMINISTRADOR, | ||
ROL_AUDITOR, | ||
ROL_EJECUTOR, | ||
ROL_JEFE, | ||
ROL_ANALISTA, | ||
ROL_SOPORTE | ||
] | ||
|
||
estados =[ | ||
"ACTIVO", | ||
"INACTIVO" | ||
] | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
src/app/modules/gestion-usuarios/gestion-usuarios-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { RegistrarUsuarioComponent } from './registrar-usuario/registrar-usuario.component'; | ||
import { ActualizarUsuarioComponent } from './actualizar-usuario/actualizar-usuario.component'; | ||
|
||
const routes: Routes = [ | ||
{ path:"", | ||
children: [ | ||
{ | ||
path: 'registrar-usuario', | ||
component: RegistrarUsuarioComponent | ||
}, | ||
{ | ||
path: 'actualizar-usuario', | ||
component: ActualizarUsuarioComponent | ||
}, | ||
], | ||
} | ||
|
||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class GestionUsuariosRoutingModule { } | ||
|
40 changes: 40 additions & 0 deletions
40
src/app/modules/gestion-usuarios/gestion-usuarios.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { HttpClientModule, provideHttpClient } from '@angular/common/http'; | ||
import { RegistrarUsuarioComponent } from './registrar-usuario/registrar-usuario.component'; | ||
import { GestionUsuariosRoutingModule } from './gestion-usuarios-routing.module'; | ||
|
||
//Material | ||
import { MatInputModule } from '@angular/material/input'; | ||
import { MatSelectModule } from '@angular/material/select'; | ||
import { MatButtonModule } from '@angular/material/button'; | ||
import { MatIconModule } from '@angular/material/icon'; | ||
import { MatDatepickerModule} from '@angular/material/datepicker'; | ||
import { MatNativeDateModule } from '@angular/material/core'; | ||
import { NgFor } from '@angular/common'; | ||
import { MatCardModule } from '@angular/material/card'; | ||
import { MatFormFieldModule } from '@angular/material/form-field'; | ||
import { ActualizarUsuarioComponent } from './actualizar-usuario/actualizar-usuario.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
RegistrarUsuarioComponent, | ||
ActualizarUsuarioComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
GestionUsuariosRoutingModule, | ||
HttpClientModule, | ||
MatInputModule, | ||
MatSelectModule, | ||
MatButtonModule, | ||
MatIconModule, | ||
MatDatepickerModule, | ||
MatNativeDateModule, | ||
NgFor, | ||
MatCardModule, | ||
MatFormFieldModule | ||
] | ||
}) | ||
export class GestionUsuariosModule { } |
62 changes: 62 additions & 0 deletions
62
src/app/modules/gestion-usuarios/registrar-usuario/registrar-usuario.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
|
||
<div class="container-border"> | ||
<h2 class="titulo">Crear Usuario(a)</h2> | ||
|
||
<div class="inputs"> | ||
<mat-form-field appearance="fill"> | ||
<mat-label>Documento de identidad:</mat-label> | ||
<input type="text" matInput /> | ||
<mat-icon matSuffix>search</mat-icon> | ||
</mat-form-field> | ||
|
||
<mat-form-field appearance="fill" class="correo"> | ||
<mat-label>Correo:</mat-label> | ||
<input type="text" matInput /> | ||
<mat-icon matSuffix>search</mat-icon> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div class="nombre"> | ||
<mat-form-field appearance="fill"> | ||
<mat-label>Nombres y Apellidos:</mat-label> | ||
<input type="text" matInput /> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div class="Rol"> | ||
<mat-form-field class="rol-width"> | ||
<mat-label >Rol:</mat-label> | ||
<mat-select > | ||
<mat-option mat-option *ngFor="let rol of roles" [value]="rol"> | ||
{{ rol }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div class="fechas"> | ||
<mat-form-field > | ||
<mat-label>Fecha Inicial Rol:</mat-label> | ||
<input matInput [matDatepicker]="picker1"> | ||
<mat-datepicker-toggle matIconSuffix [for]="picker1"></mat-datepicker-toggle> | ||
<mat-datepicker #picker1></mat-datepicker> | ||
</mat-form-field> | ||
|
||
<mat-form-field > | ||
<mat-label>Fecha Final Rol:</mat-label> | ||
<input matInput [matDatepicker]="picker2"> | ||
<mat-datepicker-toggle matIconSuffix [for]="picker2"></mat-datepicker-toggle> | ||
<mat-datepicker #picker2></mat-datepicker> | ||
</mat-form-field> | ||
|
||
</div> | ||
|
||
<div class="button-container"> | ||
<button mat-raised-button class="Bcancelar" >Cancelar</button> | ||
<button mat-raised-button color="primary" (click)="printFormData()">Guardar</button> | ||
</div> | ||
</div> |
Oops, something went wrong.