add filtro por nombre en la pagina principal
This commit is contained in:
parent
4710ed3d8c
commit
c305c1d369
|
@ -68,8 +68,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="icon-stack icon-stack-xl bg-gradient-primary-to-secondary text-white mb-4"><i data-feather="truck"></i></div>
|
<div class="icon-stack icon-stack-xl bg-gradient-primary-to-secondary text-white mb-4"><i data-feather="truck"></i></div>
|
||||||
<h2>Pensar en el texto</h2>
|
<h2>Diverso contenido</h2>
|
||||||
<p class="mb-0">Pensar en el texto</p>
|
<p class="mb-0">Podrá encontrar y crear encuestas de diferentes categorías.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -83,8 +83,19 @@
|
||||||
<div class="bg-light py-10 container-encuestas">
|
<div class="bg-light py-10 container-encuestas">
|
||||||
<div class="container px-0">
|
<div class="container px-0">
|
||||||
<h1 class="text-center mb-4">Encuestas</h1>
|
<h1 class="text-center mb-4">Encuestas</h1>
|
||||||
<div class="row gx-5">
|
<form class="ds-form d-inline">
|
||||||
<div class="col-xl-4 col-lg-4 col-md-6 mb-5" *ngFor="let encuesta of encuestas; trackBy: trackId">
|
<div class="input-group">
|
||||||
|
<div class="col-3">
|
||||||
|
<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
|
||||||
|
<input type="text" name="searchEncuesta" placeholder="Buscar por nombre..." [(ngModel)]="searchEncuestaPublica" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="row gx-5" *ngIf="encuestas && encuestas.length > 0">
|
||||||
|
<div
|
||||||
|
class="col-xl-4 col-lg-4 col-md-6 mb-5"
|
||||||
|
*ngFor="let encuesta of encuestas | filter: 'nombre':searchEncuestaPublica; trackBy: trackId"
|
||||||
|
>
|
||||||
<div class="card lift h-100" (dblclick)="openSurvey($event)" (click)="selectSurvey($event)" [attr.data-id]="encuesta.id">
|
<div class="card lift h-100" (dblclick)="openSurvey($event)" (click)="selectSurvey($event)" [attr.data-id]="encuesta.id">
|
||||||
<div class="card-body p-3">
|
<div class="card-body p-3">
|
||||||
<div class="card-title mb-0">{{ encuesta.nombre }}</div>
|
<div class="card-title mb-0">{{ encuesta.nombre }}</div>
|
||||||
|
|
|
@ -17,7 +17,7 @@ import { UsuarioExtraService } from 'app/entities/usuario-extra/service/usuario-
|
||||||
import { AccountService } from 'app/core/auth/account.service';
|
import { AccountService } from 'app/core/auth/account.service';
|
||||||
import { Account } from 'app/core/auth/account.model';
|
import { Account } from 'app/core/auth/account.model';
|
||||||
|
|
||||||
import { faShareAlt, faWindowMaximize, faPollH, faCalendarAlt, faAngleDown, faStar } from '@fortawesome/free-solid-svg-icons';
|
import { faPollH, faCalendarAlt, faStar } from '@fortawesome/free-solid-svg-icons';
|
||||||
|
|
||||||
import * as $ from 'jquery';
|
import * as $ from 'jquery';
|
||||||
|
|
||||||
|
@ -36,11 +36,12 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
faStar = faStar;
|
faStar = faStar;
|
||||||
faCalendarAlt = faCalendarAlt;
|
faCalendarAlt = faCalendarAlt;
|
||||||
faWindowMaximize = faWindowMaximize;
|
|
||||||
faPollH = faPollH;
|
faPollH = faPollH;
|
||||||
|
|
||||||
notAccount: boolean = true;
|
notAccount: boolean = true;
|
||||||
|
|
||||||
|
public searchEncuestaPublica: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected encuestaService: EncuestaService,
|
protected encuestaService: EncuestaService,
|
||||||
protected modalService: NgbModal,
|
protected modalService: NgbModal,
|
||||||
|
@ -50,9 +51,12 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||||
protected fb: FormBuilder,
|
protected fb: FormBuilder,
|
||||||
protected accountService: AccountService,
|
protected accountService: AccountService,
|
||||||
protected router: Router
|
protected router: Router
|
||||||
) {}
|
) {
|
||||||
|
this.searchEncuestaPublica = '';
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.searchEncuestaPublica = '';
|
||||||
this.accountService
|
this.accountService
|
||||||
.getAuthenticationState()
|
.getAuthenticationState()
|
||||||
.pipe(takeUntil(this.destroy$))
|
.pipe(takeUntil(this.destroy$))
|
||||||
|
|
Loading…
Reference in New Issue