Fix survey list context menu

This commit is contained in:
Pablo Bonilla 2021-07-24 22:12:50 -06:00
parent 4fddf0b130
commit e90c590f93
No known key found for this signature in database
GPG Key ID: 46877262B8DE47E2
5 changed files with 122 additions and 123 deletions

View File

@ -132,7 +132,7 @@
</ul>
</div>
<div
class="ds-list--entity card-encuesta lift"
class="ds-list--entity"
*ngFor="
let encuesta of encuestas! | filter: 'nombre':searchString | filter: 'acceso':accesoEncuesta | filter: 'estado':estadoEncuesta;
trackBy: trackId

View File

@ -265,7 +265,6 @@ export class EncuestaComponent implements OnInit, AfterViewInit {
})
)
.subscribe(data => {
console.log(data);
this.encuestaencontrada = data;
});
@ -449,13 +448,8 @@ export class EncuestaComponent implements OnInit, AfterViewInit {
if (event.type === 'contextmenu') {
event.preventDefault();
debugger;
this.selectedSurveyId = event.target.dataset.id;
console.log(this.selectedSurveyId);
debugger;
let res = await this.encuestaService.find(this.selectedSurveyId).toPromise();
this.selectedSurvey = res.body;
this.isPublished = this.selectedSurvey!.estado === 'DRAFT'; // QUE SE LE MUESTRE CUANDO ESTE EN DRAFT
@ -490,9 +484,7 @@ export class EncuestaComponent implements OnInit, AfterViewInit {
}
}
publish() {
debugger;
publish(): void {
const modalRef = this.modalService.open(EncuestaPublishDialogComponent, { size: 'lg', backdrop: 'static' });
modalRef.componentInstance.encuesta = this.selectedSurvey;
// unsubscribe not needed because closed completes on modal close

View File

@ -99,3 +99,4 @@
@import 'paper-dashboard/datasurvey-table';
@import 'paper-dashboard/datasurvey-contextmenu';
@import 'paper-dashboard/datasurvey-survey-update';
@import 'paper-dashboard/datasurvey-home';

View File

@ -0,0 +1,112 @@
/**
Cards
**/
.lift {
box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.lift:hover {
transform: translateY(-0.3333333333rem);
box-shadow: 0 0.5rem 2rem 0 rgba(33, 40, 50, 0.25);
}
.lift:active {
transform: none;
box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
}
.lift-sm {
box-shadow: 0 0.125rem 0.25rem 0 rgba(33, 40, 50, 0.2);
}
.lift-sm:hover {
transform: translateY(-0.1666666667rem);
box-shadow: 0 0.25rem 1rem 0 rgba(33, 40, 50, 0.25);
}
.lift-sm:active {
transform: none;
box-shadow: 0 0.125rem 0.25rem 0 rgba(33, 40, 50, 0.2);
}
.card-encuesta {
border-radius: 12px;
background-color: #ffffff;
margin-bottom: 20px;
position: relative;
border: 0 none;
}
.card-encuesta.lift {
text-decoration: none;
color: inherit;
}
.card-flag {
position: absolute;
font-size: 0.7rem;
padding: 0.3rem 0.5rem;
line-height: 1;
}
.card-flag-dark {
background-color: rgba(33, 40, 50, 0.7);
color: #fff;
}
.card-flag-light {
background-color: rgba(255, 255, 255, 0.7);
color: #69707a;
}
.card-flag-lg {
font-size: 0.9rem;
padding: 0.5rem 0.65rem;
}
.card-flag-top-right {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
top: 0.5rem;
right: 0;
}
.card-flag-top-left {
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
top: 0.5rem;
left: 0;
}
.card-encuesta .entity-icon--star {
color: #ffcc47;
margin-right: 0.2rem;
}
.card-encuesta .card-title {
font-size: 2em;
}
.card-encuesta .tag {
font-size: 0.8rem;
color: #f8f8f8;
margin-top: 0.5rem;
padding: 0.2rem 1.5rem;
background-color: #2962ff94;
border-radius: 15px;
}
.card-encuesta .subtitle {
color: rgba(0, 0, 0, 0.54);
font-size: 0.9rem;
}
.card-encuesta .btn-card {
padding: 11px 10px !important;
}
.border-cyan {
border-color: #00cfd5 !important;
}
.py-10 {
padding-top: 6rem !important;
padding-bottom: 6rem !important;
}

View File

@ -31,6 +31,13 @@
padding: 0.5rem;
margin: 1rem;
word-wrap: break-word;
transition: all 0.1s ease-in-out;
&:hover {
// top: -3px;
// box-shadow: rgba(80, 80, 80, 0.15) 0px 5px 15px;
background-color: #f5f9fd;
}
* {
pointer-events: none;
@ -132,116 +139,3 @@
background-color: #e8f0fe !important;
}
}
/**
Cards
**/
.lift {
box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.lift:hover {
transform: translateY(-0.3333333333rem);
box-shadow: 0 0.5rem 2rem 0 rgba(33, 40, 50, 0.25);
}
.lift:active {
transform: none;
box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
}
.lift-sm {
box-shadow: 0 0.125rem 0.25rem 0 rgba(33, 40, 50, 0.2);
}
.lift-sm:hover {
transform: translateY(-0.1666666667rem);
box-shadow: 0 0.25rem 1rem 0 rgba(33, 40, 50, 0.25);
}
.lift-sm:active {
transform: none;
box-shadow: 0 0.125rem 0.25rem 0 rgba(33, 40, 50, 0.2);
}
.card-encuesta {
border-radius: 12px;
background-color: #ffffff;
margin-bottom: 20px;
position: relative;
border: 0 none;
}
.card-encuesta.lift {
text-decoration: none;
color: inherit;
}
.card-flag {
position: absolute;
font-size: 0.7rem;
padding: 0.3rem 0.5rem;
line-height: 1;
}
.card-flag-dark {
background-color: rgba(33, 40, 50, 0.7);
color: #fff;
}
.card-flag-light {
background-color: rgba(255, 255, 255, 0.7);
color: #69707a;
}
.card-flag-lg {
font-size: 0.9rem;
padding: 0.5rem 0.65rem;
}
.card-flag-top-right {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
top: 0.5rem;
right: 0;
}
.card-flag-top-left {
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
top: 0.5rem;
left: 0;
}
.card-encuesta .entity-icon--star {
color: #ffcc47;
margin-right: 0.2rem;
}
.card-encuesta .card-title {
font-size: 2em;
}
.card-encuesta .tag {
font-size: 0.8rem;
color: #f8f8f8;
margin-top: 0.5rem;
padding: 0.2rem 1.5rem;
background-color: #2962ff94;
border-radius: 15px;
}
.card-encuesta .subtitle {
color: rgba(0, 0, 0, 0.54);
font-size: 0.9rem;
}
.card-encuesta .btn-card {
padding: 11px 10px !important;
}
.border-cyan {
border-color: #00cfd5 !important;
}
.py-10 {
padding-top: 6rem !important;
padding-bottom: 6rem !important;
}