Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
Bfs42024 290 (#211)
Browse files Browse the repository at this point in the history
* hecho todo

* papelera

* ultimos estilos

* estilos finales

---------

Co-authored-by: eluiui <[email protected]>
Co-authored-by: javi2004 <[email protected]>
  • Loading branch information
3 people authored Dec 12, 2024
1 parent 610aad3 commit 8788e4c
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 12 deletions.
6 changes: 6 additions & 0 deletions cd2024bfs4g1-frontend/src/main/ngx/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export class AppComponent implements OnInit {
if (this.ontimizeMatIconRegistry.addOntimizeSvgIcon) {
this.ontimizeMatIconRegistry.addOntimizeSvgIcon('warning', 'assets/icons/warning.svg');
}
if (this.ontimizeMatIconRegistry.addOntimizeSvgIcon) {
this.ontimizeMatIconRegistry.addOntimizeSvgIcon('papelera', 'assets/icons/papelera.svg');
}
if (this.ontimizeMatIconRegistry.addOntimizeSvgIcon) {
this.ontimizeMatIconRegistry.addOntimizeSvgIcon('papelera1', 'assets/icons/papelerareciclaje.svg');
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -613,4 +613,18 @@ o-list img {
justify-content: space-between;
padding: 25px;
background-color: #f5f0f2;
}

.pa2{
display: none;
}
.boton_eliminar:hover .pa2{
display: block;
}
.boton_eliminar:hover .pa1{
display: none;
}
.cont-bot{
padding-top: 16px ;
padding-right: 0px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@ <h3> {{'Mentors' | oTranslate}}</h3>
tutor.surname2 }}</a></mat-card-title>
<mat-card-subtitle>{{ tutor.email }} </mat-card-subtitle>
<mat-card-subtitle>{{ tutor.tutor_name_type}} </mat-card-subtitle>
<mat-card-actions>
<button class="boton_eliminar" (click)="deleteTutorBootcamp(tutor)">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M3 6h18v2H3V6zm2 3h14l-1 12H6L5 9zm4-3h6v-2H9v2z" />
</svg>
<mat-card-actions class="cont-bot">
<button class="boton_eliminar" (click)="deleteTutorBootcamp(tutor)" >
<mat-icon class="pa1" svgIcon="ontimize:papelera1"></mat-icon>
<mat-icon class="pa2" svgIcon="ontimize:papelera"></mat-icon>
</button>
</mat-card-actions>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ background-color: #f5f0f2;
display:grid;
grid-template-columns: 2.5fr 0.5fr;
}

.cont-card{
display: flex;
flex-direction: row;
}
:host {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -363,3 +366,34 @@ div.notification label {
opacity: 0;
}

.boton_eliminar {
border: none;
border-radius: 10px;
box-shadow: none;
background-color: white;
}

.boton_eliminar svg {
z-index: 1;
height: 30px;
width: 30px;
fill: #f24444;
justify-content: center;
align-items: flex-end;
}
.pa2{
display: none;
}
.boton_eliminar:hover .pa2{
display: block;
}
.boton_eliminar:hover .pa1{
display: none;
}
.cont-bot{
padding-top: 16px ;
padding-right: 0px;
}
.head{
padding-left: 10px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,23 @@ <h3>{{ 'Historial_Laboral' | oTranslate }}</h3>
<o-form-layout-manager class="selectedrow" mode="dialog">
<o-form-layout-dialog-options class="popup">
<o-list #list attr="notesList" sort-columns="id:DESC" service="notes" entity="notes" keys="id" parent-keys="id_students:id" insert-button="true"
delete-button="true" insert-form-route="new_note" columns="id;nota;id_students;fecha" quick-filter="false"
delete-button="true" insert-form-route="new_note" delete-button="true" columns="id;nota;id_students;fecha" quick-filter="false"
refresh-button="false" insert-button="true" delete-button="true" detail-mode="true" selectable="true"
detail-button-in-row="true" edit-button-in-row="false" pagination-controls="false"
insert-button-position="" show-buttons-text="false" controls="false">
<mat-card class="notas list_container o-list-container" #idNota *ngFor="let notas of list.dataArray">
<mat-card-header >
<mat-card-title class="fromatotextotitulo"><a>{{ notas.fecha | date:'dd/MM/yyyy' }}</a></mat-card-title>
<mat-card-subtitle class="fromatotexto">{{ notas.nota }} </mat-card-subtitle>
</mat-card-header>
<div class="cont-card">
<mat-card-actions class="cont-bot">
<button class="boton_eliminar" (click)="deleteNotes(notas)" >
<mat-icon class="pa1" svgIcon="ontimize:papelera1"></mat-icon>
<mat-icon class="pa2" svgIcon="ontimize:papelera"></mat-icon>
</button>
</mat-card-actions>
<mat-card-header class="head" >
<mat-card-title class="fromatotextotitulo"><a>{{ notas.fecha | date:'dd/MM/yyyy' }}</a></mat-card-title>
<mat-card-subtitle class="fromatotexto">{{ notas.nota }} </mat-card-subtitle>
</mat-card-header>
</div>
</mat-card>

</o-list>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Injector, ViewChild } from '@angular/core';
import { DialogService, OFileInputComponent, OFormComponent, OImageComponent, OntimizeService, OTableComponent, OTextInputComponent, OValidators } from 'ontimize-web-ngx';
import { DialogService, OFileInputComponent, OFormComponent, OImageComponent, OListComponent, OntimizeService, OTableComponent, OTextInputComponent, OValidators } from 'ontimize-web-ngx';
import { ODateInputComponent } from 'ontimize-web-ngx';
import { FormControl, ValidationErrors, ValidatorFn } from '@angular/forms';
import { Router } from '@angular/router';
Expand Down Expand Up @@ -262,7 +262,28 @@ protected configureBootcamps() {
this.service.configureService(conf);

}
protected configureNotes() {
const conf = this.service.getDefaultServiceConfiguration('notes');
this.service.configureService(conf);

}
@ViewChild("list") list: OListComponent;

deleteNotes(notas: any) {

this.configureNotes();
this.dialogService.confirm('Confirm_dialog_title', 'Do_you_really_want_to_delete');
this.dialogService.dialogRef.afterClosed().subscribe( result => {
if(result) {
this.service.delete({id: notas.id}, 'notes').subscribe(res => {
if (res.code === 0) {
this.list.reloadData();
}
});
}
});

}


}
61 changes: 61 additions & 0 deletions cd2024bfs4g1-frontend/src/main/ngx/src/assets/icons/papelera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions cd2024bfs4g1-frontend/src/main/ngx/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -411,3 +411,7 @@ o-column.o-column .o-container > .o-container-title span{
.mat-mdc-option .mat-pseudo-checkbox-minimal {
display: none;
}

.mat-mdc-card{
box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0);
}

0 comments on commit 8788e4c

Please sign in to comment.