add lista de encuestas a landing page, modificaciones para prototipo

This commit is contained in:
Mariela Bonilla 2021-07-24 02:49:55 -06:00
parent 3bd65155e7
commit 808847f541
9 changed files with 409 additions and 280 deletions

View File

@ -194,7 +194,7 @@
<fa-icon icon="pencil-alt"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
</button>
<button type="submit" (click)="delete(encuesta)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
<fa-icon icon="times"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>

View File

@ -1,82 +1,3 @@
<div class="row">
<div class="col-md-3">
<span class="hipster img-fluid rounded"></span>
</div>
<div class="col-md-9">
<h1 class="display-4"><span jhiTranslate="home.title">Welcome, Java Hipster!</span> (Data Survey)</h1>
<p class="lead" jhiTranslate="home.subtitle">This is your homepage</p>
<div [ngSwitch]="account !== null">
<div class="alert alert-success" *ngSwitchCase="true">
<span id="home-logged-message" *ngIf="account" jhiTranslate="home.logged.message" [translateValues]="{ username: account.login }"
>You are logged in as user "{{ account.login }}".</span
>
</div>
<div class="alert alert-warning" *ngSwitchCase="false">
<span jhiTranslate="global.messages.info.authenticated.prefix">If you want to </span>
<a class="alert-link" (click)="login()" jhiTranslate="global.messages.info.authenticated.link">sign in</a
><span jhiTranslate="global.messages.info.authenticated.suffix"
>, you can try the default accounts:<br />- Administrator (login="admin" and password="admin") <br />- User (login="user" and
password="user").</span
>
</div>
<div class="alert alert-warning" *ngSwitchCase="false">
<span jhiTranslate="global.messages.info.register.noaccount">You don't have an account yet?</span>&nbsp;
<a class="alert-link" routerLink="account/register" jhiTranslate="global.messages.info.register.link">Register a new account</a>
</div>
</div>
<p jhiTranslate="home.question">If you have any question on JHipster:</p>
<ul>
<li>
<a href="https://www.jhipster.tech/" target="_blank" rel="noopener noreferrer" jhiTranslate="home.link.homepage"
>JHipster homepage</a
>
</li>
<li>
<a
href="https://stackoverflow.com/tags/jhipster/info"
target="_blank"
rel="noopener noreferrer"
jhiTranslate="home.link.stackoverflow"
>JHipster on Stack Overflow</a
>
</li>
<li>
<a
href="https://github.com/jhipster/generator-jhipster/issues?state=open"
target="_blank"
rel="noopener noreferrer"
jhiTranslate="home.link.bugtracker"
>JHipster bug tracker</a
>
</li>
<li>
<a href="https://gitter.im/jhipster/generator-jhipster" target="_blank" rel="noopener noreferrer" jhiTranslate="home.link.chat"
>JHipster public chat room</a
>
</li>
<li>
<a href="https://twitter.com/jhipster" target="_blank" rel="noopener noreferrer" jhiTranslate="home.link.follow"
>follow @jhipster on Twitter</a
>
</li>
</ul>
<p>
<span jhiTranslate="home.like">If you like JHipster, don't forget to give us a star on</span>
<a href="https://github.com/jhipster/generator-jhipster" target="_blank" rel="noopener noreferrer" jhiTranslate="home.github"
>GitHub</a
>!
</p>
</div>
</div>
<div class="row">
<div class="col">
<div class="container-fluid navbar navbar-marketing navbar-expand-lg bg-white navbar-light">
@ -85,12 +6,12 @@
><img src="http://datasurvey.org/content/img_datasurvey/datasurvey-logo-text-black.svg" width="300" alt=""
/></a>
<div class="col-4">
<a routerLink="/login">
<div class="col-4" [hidden]="!notAccount">
<a href="login">
<button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Iniciar Sesión</button>
</a>
<a routerLink="/account/register">
<a href="account/register">
<button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Registrarse</button>
</a>
</div>
@ -99,19 +20,19 @@
<!-- Page Header-->
<div
class="page-header-ui page-header-ui-dark bg-img-cover overlay overlay-40"
style="background-image: url('../../content/img_datasurvey/banner-home.jpg')"
style="background-image: url('../../content/img_datasurvey/banner2.png')"
>
<div class="page-header-ui-content py-5 position-relative">
<div class="container px-5">
<div class="row gx-5 justify-content-center">
<div class="col-xl-8 col-lg-10 text-center">
<div data-aos="fade-up">
<h1 class="page-header-ui-title">We are a branding and design studio</h1>
<p class="page-header-ui-text">
We are a group of creatives and developers who design, build, and optimize brands and digital experiences.
</p>
<h1 class="page-header-ui-title">¡Le damos la bienvenida a DataSurvey!</h1>
<h5 class="page-header-ui-text">
Somos su mejor aliado para la recolección de información, a través de nuestra plataforma.
</h5>
</div>
<div class="row">
<!--<div class="row">
<div class="col">
<a routerLink="/login">
<button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Iniciar Sesión</button>
@ -120,7 +41,7 @@
<button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Registrarse</button>
</a>
</div>
</div>
</div>-->
</div>
</div>
</div>
@ -137,18 +58,18 @@
<div class="row gx-5 text-center">
<div class="col-lg-4 mb-5 mb-lg-0">
<div class="icon-stack icon-stack-xl bg-gradient-primary-to-secondary text-white mb-4"><i data-feather="droplet"></i></div>
<h2>Design</h2>
<p class="mb-0">We start by creating a set of brand guidelines and standards</p>
<h2>El Mejor diseño</h2>
<p class="mb-0">Tenemos el mejor diseño para que pueda disfrutar visualmente de la plataforma.</p>
</div>
<div class="col-lg-4 mb-5 mb-lg-0">
<div class="icon-stack icon-stack-xl bg-gradient-primary-to-secondary text-white mb-4"><i data-feather="code"></i></div>
<h2>Develop</h2>
<p class="mb-0">Our award winning development team creates personalized digital experiences</p>
<h2>Fácil uso</h2>
<p class="mb-0">Contamos con una plataforma muy sencilla de usar.</p>
</div>
<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>
<h2>Deliver</h2>
<p class="mb-0">Our products are created on time, and to your exact specifications</p>
<h2>Pensar en el texto</h2>
<p class="mb-0">Pensar en el texto</p>
</div>
</div>
</div>
@ -159,193 +80,171 @@
</svg>
</div>
</div>
<div class="bg-light py-10">
<div class="container px-5">
<h2 class="mb-4">Recent postings</h2>
<div class="bg-light py-10 container-encuestas">
<div class="container px-0">
<h1 class="text-center mb-4">Encuestas</h1>
<div class="row gx-5">
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/tG36rvCeqng/800x500" alt="..." />
<div class="col-xl-4 col-lg-4 col-md-6 mb-5" *ngFor="let encuesta of encuestas; trackBy: trackId">
<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-title small mb-0">Gray Bicycle</div>
<div class="text-xs text-gray-500">Readcaster, CO · 2 days ago</div>
<div class="card-title mb-0">{{ encuesta.nombre }}</div>
<div class="entity-body--row m-2">
<span class="tag mt-2">{{ encuesta.categoria?.nombre | lowercase }}</span>
</div>
<div class="entity-body--row m-2">
<span class="subtitle mt-2">{{ encuesta.descripcion | titlecase }}</span>
</div>
<div class="text-xs text-gray-500">
<div class="entity-body">
<div class="entity-body--row m-2">
<span class="mt-2"
>Fecha Publicada&nbsp;&nbsp;<fa-icon class="entity-icon--access" [icon]="faCalendarAlt"></fa-icon>&nbsp;&nbsp;{{
encuesta.fechaPublicacion | formatShortDatetime | titlecase
}}</span
>
</div>
<div class="entity-body--row m-2">
<span class="mt-2"
>Fecha de Finalización &nbsp;&nbsp;<fa-icon class="entity-icon--access" [icon]="faCalendarAlt"></fa-icon
>&nbsp;&nbsp;{{ encuesta.fechaFinalizar | formatShortDatetime | titlecase }}</span
>
</div>
<div class="entity-body--row m-2">
<p>Calificacion</p>
<fa-icon *ngFor="let i of [].constructor(encuesta.calificacion)" class="entity-icon--star" [icon]="faStar"></fa-icon>
<fa-icon
*ngFor="let i of [].constructor(5 - encuesta.calificacion!)"
class="entity-icon--star--off"
[icon]="faStar"
></fa-icon>
</div>
<div class="entity-body--row m-2">
<button class="ds-btn btn-card"><fa-icon [icon]="faPollH"></fa-icon>&nbsp;&nbsp;Completar encuesta</button>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/nHOz7sp5nHE/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Hanimex Camera</div>
<div class="text-xs text-gray-500">Waterlow, CO · 3 days ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/GkFQEOubrCo/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Macbook Pro</div>
<div class="text-xs text-gray-500">Waterlow, CO · 4 hours ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/3bdSGpKVAmk/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Assorted Skin Care</div>
<div class="text-xs text-gray-500">Waterlow, CO · 29 minutes ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/w9IHmVSNBfU/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Brown Ukulele</div>
<div class="text-xs text-gray-500">Readcaster, CO · 3 days ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/bpg-ngqrPc8/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Leather Sofa</div>
<div class="text-xs text-gray-500">Readcaster, CO · 2 hours ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/fZuleEfeA1Q/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Green Suede Sofa</div>
<div class="text-xs text-gray-500">Waterlow, CO · 2 days ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/rjhAiP3cj9E/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Metal Chairs</div>
<div class="text-xs text-gray-500">Readcaster, CO · 5 days ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/5ba6j8d_oXY/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Wireless Earbuds</div>
<div class="text-xs text-gray-500">Readcaster, CO · 1 month ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/ESoE_buQvNQ/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Muscle Car</div>
<div class="text-xs text-gray-500">Waterlow, CO · 1 week ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/zuE9jsaVHuA/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Hardwood Dresser</div>
<div class="text-xs text-gray-500">Waterlow, CO · 2 weeks ago</div>
</div>
</a>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 mb-5">
<a class="card lift h-100" href="#!">
<img class="card-img-top" src="https://source.unsplash.com/WuRsjF4iZK0/800x500" alt="..." />
<div class="card-body p-3">
<div class="card-title small mb-0">Classic Motorcycle</div>
<div class="text-xs text-gray-500">Readcaster, CO · 1 week ago</div>
</div>
</a>
</div>
</div>
<div class="mb-10">
<a class="text-arrow-icon" href="#!">
See more deals near you
<i data-feather="arrow-right"></i>
</a>
</div>
<h2 class="mb-4">Browse Categories</h2>
<div class="row gx-5">
<div class="col-lg-3 col-md-6 mb-5">
<a class="card lift border-top-0 border-start-0 border-end-0 border-bottom-lg border-red" href="#!">
<div class="card-body text-center">
<div class="icon-stack icon-stack-xl bg-red text-white mb-2"><i class="fas fa-car"></i></div>
<div class="small text-gray-600">Cars</div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<a class="card lift border-top-0 border-start-0 border-end-0 border-bottom-lg border-orange" href="#!">
<div class="card-body text-center">
<div class="icon-stack icon-stack-xl bg-orange text-white mb-2"><i class="fas fa-home"></i></div>
<div class="small text-gray-600">Housing</div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<a class="card lift border-top-0 border-start-0 border-end-0 border-bottom-lg border-yellow" href="#!">
<div class="card-body text-center">
<div class="icon-stack icon-stack-xl bg-yellow text-white mb-2"><i class="fas fa-gift"></i></div>
<div class="small text-gray-600">Free</div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<a class="card lift border-top-0 border-start-0 border-end-0 border-bottom-lg border-green" href="#!">
<div class="card-body text-center">
<div class="icon-stack icon-stack-xl bg-green text-white mb-2"><i class="fas fa-mobile-alt"></i></div>
<div class="small text-gray-600">Tech</div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-6 mb-5 mb-lg-0">
<a class="card lift border-top-0 border-start-0 border-end-0 border-bottom-lg border-cyan" href="#!">
<div class="card-body text-center">
<div class="icon-stack icon-stack-xl bg-cyan text-white mb-2"><i class="fas fa-couch"></i></div>
<div class="small text-gray-600">Furniture</div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-6 mb-5 mb-lg-0">
<a class="card lift border-top-0 border-start-0 border-end-0 border-bottom-lg border-blue" href="#!">
<div class="card-body text-center">
<div class="icon-stack icon-stack-xl bg-blue text-white mb-2"><i class="fas fa-briefcase"></i></div>
<div class="small text-gray-600">Jobs</div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-6 mb-5 mb-lg-0">
<a class="card lift border-top-0 border-start-0 border-end-0 border-bottom-lg border-purple" href="#!">
<div class="card-body text-center">
<div class="icon-stack icon-stack-xl bg-purple text-white mb-2"><i class="fas fa-motorcycle"></i></div>
<div class="small text-gray-600">Leisure</div>
</div>
</a>
</div>
<div class="col-lg-3 col-md-6">
<a class="card lift border-top-0 border-start-0 border-end-0 border-bottom-lg border-pink" href="#!">
<div class="card-body text-center">
<div class="icon-stack icon-stack-xl bg-pink text-white mb-2"><i class="fas fa-shopping-cart"></i></div>
<div class="small text-gray-600">Other</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="container mt-4">
<div class="text-center mb-4">
<h1>Preguntas frecuentes</h1>
</div>
<!--Accordion wrapper-->
<div class="accordion md-accordion" id="accordionEx" role="tablist" aria-multiselectable="true">
<!-- Accordion card -->
<div class="card accordion-item">
<!-- Card header -->
<div class="card-header" role="tab" id="headingOne1">
<a
data-toggle="collapse"
data-parent="#accordionEx"
href="#collapseOne1"
aria-expanded="true"
aria-controls="collapseOne1"
class="accordion-header"
>
<h2 class="mb-0">
<button
class="accordion-button py-4 collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapseOne1"
aria-expanded="true"
aria-controls="collapseOne"
>
¿Qué métodos de pago estás disponibles en DataSurvey?
</button>
</h2>
</a>
</div>
<!-- Card body -->
<div id="collapseOne1" class="collapse show" role="tabpanel" aria-labelledby="headingOne1" data-parent="#accordionEx">
<div class="card-body">DataSurvey utiliza PayPal como método de pago para la compra de plantillas.</div>
</div>
</div>
<!-- Accordion card -->
<!-- Accordion card -->
<div class="card accordion-item">
<!-- Card header -->
<div class="card-header" role="tab" id="headingTwo2">
<a
data-toggle="collapse"
data-parent="#accordionEx"
href="#collapseTwo2"
aria-expanded="true"
aria-controls="collapseTwo2"
class="accordion-header"
>
<h2 class="mb-0">
<button
class="accordion-button py-4 collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapseTwo2"
aria-expanded="true"
aria-controls="collapseTwo"
>
¿Debo iniciar sesión o registrarme para poder completar encuestas?
</button>
</h2>
</a>
</div>
<!-- Card body -->
<div id="collapseTwo2" class="collapse" role="tabpanel" aria-labelledby="headingTwo2" data-parent="#accordionEx">
<div class="card-body">
Uno de los objetivos de DataSurvey es que se puedan compartir las encuestas con todos los usuarios, sin necesidad de tener una
cuenta en la plataforma.
</div>
</div>
</div>
<!-- Accordion card -->
<!-- Accordion card -->
<div class="card">
<!-- Card header -->
<!-- Card header -->
<div class="card-header" role="tab" id="headingThree3">
<a
data-toggle="collapse"
data-parent="#accordionEx"
href="#collapseThree3"
aria-expanded="true"
aria-controls="collapseThree3"
class="accordion-header"
>
<h2 class="mb-0">
<button
class="accordion-button py-4 collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapseThree3"
aria-expanded="true"
aria-controls="collapseThree"
>
¿Cómo comparto una encuesta?
</button>
</h2>
</a>
</div>
<!-- Card body -->
<div id="collapseThree3" class="collapse" role="tabpanel" aria-labelledby="headingThree3" data-parent="#accordionEx">
<div class="card-body">
La plataforma tiene dos tipos de encuestas: públicas y privadas. Las públicas pueden ser compartidas con todo tipo de usuario,
sin ninguna excepción, mientras que las encuestas privadas, necesitan de una clave para poder ser completadas.
</div>
</div>
</div>
<!-- Accordion card -->
</div>
<!-- Accordion wrapper -->
</div>
</div>
</div>

View File

@ -258,7 +258,157 @@ Main page styles
width: 1.75rem;
}
.container-encuestas {
background-image: url('../../content/img_datasurvey/background encuestas landing.png');
max-height: 1536px;
overflow-y: auto;
}
.bg-gradient-primary-to-secondary {
background-color: #1c44b2 !important;
background-image: linear-gradient(135deg, #1c44b2 0%, #00b88d 100%) !important;
}
.card .entity-icon--star {
color: #ffcc47;
margin-right: 0.2rem;
}
.card .card-title {
font-size: 2em;
}
.card .tag {
font-size: 0.8rem;
color: #f8f8f8;
margin-top: 0.5rem;
padding: 0.2rem 1.5rem;
background-color: #2962ff94;
border-radius: 15px;
}
.card .subtitle {
color: rgba(0, 0, 0, 0.54);
font-size: 0.9rem;
}
.card .btn-card {
padding: 11px 10px !important;
}
.accordion-button {
position: relative;
display: flex;
align-items: center;
width: 100%;
padding: 1rem 1.25rem;
font-size: 1rem;
color: #69707a;
text-align: left;
background-color: #fff;
border: 0;
border-radius: 0;
overflow-anchor: none;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out,
border-radius 0.15s ease;
}
@media (prefers-reduced-motion: reduce) {
.accordion-button {
transition: none;
}
}
.accordion-button:not(.collapsed) {
color: #0057da;
background-color: #e6effe;
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}
.accordion-button:not(.collapsed)::after {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230057da'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
transform: rotate(-180deg);
}
.accordion-button::after {
flex-shrink: 0;
width: 1.25rem;
height: 1.25rem;
margin-left: auto;
content: '';
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2369707a'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
background-repeat: no-repeat;
background-size: 1.25rem;
transition: transform 0.2s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
.accordion-button::after {
transition: none;
}
}
.accordion-button:hover {
z-index: 2;
}
.accordion-button:focus {
z-index: 3;
border-color: transparent;
outline: 0;
box-shadow: 0 0 0 0.25rem #00b88d3a;
}
.accordion-header {
margin-bottom: 0;
}
.accordion-item {
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.125);
}
.accordion-item:first-of-type {
border-top-left-radius: 0.35rem;
border-top-right-radius: 0.35rem;
}
.accordion-item:first-of-type .accordion-button {
border-top-left-radius: calc(0.35rem - 1px);
border-top-right-radius: calc(0.35rem - 1px);
}
.accordion-item:not(:first-of-type) {
border-top: 0;
}
.accordion-item:last-of-type {
border-bottom-right-radius: 0.35rem;
border-bottom-left-radius: 0.35rem;
}
.accordion-item:last-of-type .accordion-button.collapsed {
border-bottom-right-radius: calc(0.35rem - 1px);
border-bottom-left-radius: calc(0.35rem - 1px);
}
.accordion-item:last-of-type .accordion-collapse {
border-bottom-right-radius: 0.35rem;
border-bottom-left-radius: 0.35rem;
}
.accordion-body {
padding: 1rem 1.25rem;
}
.accordion-flush .accordion-collapse {
border-width: 0;
}
.accordion-flush .accordion-item {
border-right: 0;
border-left: 0;
border-radius: 0;
}
.accordion-flush .accordion-item:first-child {
border-top: 0;
}
.accordion-flush .accordion-item:last-child {
border-bottom: 0;
}
.accordion-flush .accordion-item .accordion-button {
border-radius: 0;
}
.card-header {
padding: 0;
}
.card-header .collapsed {
background-color: #e6effe;
}

View File

@ -1,12 +1,26 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { HttpResponse } from '@angular/common/http';
import { Router } from '@angular/router';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { IEncuesta } from 'app/entities/encuesta/encuesta.model';
import { EncuestaService } from 'app/entities/encuesta/service/encuesta.service';
import { FormBuilder } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { ICategoria } from 'app/entities/categoria/categoria.model';
import { CategoriaService } from 'app/entities/categoria/service/categoria.service';
import { IUsuarioExtra, UsuarioExtra } from 'app/entities/usuario-extra/usuario-extra.model';
import { UsuarioExtraService } from 'app/entities/usuario-extra/service/usuario-extra.service';
import { AccountService } from 'app/core/auth/account.service';
import { Account } from 'app/core/auth/account.model';
import { faShareAlt, faWindowMaximize, faPollH, faCalendarAlt, faAngleDown, faStar } from '@fortawesome/free-solid-svg-icons';
import * as $ from 'jquery';
@Component({
selector: 'jhi-home',
templateUrl: './home.component.html',
@ -14,16 +28,43 @@ import { Account } from 'app/core/auth/account.model';
})
export class HomeComponent implements OnInit, OnDestroy {
account: Account | null = null;
private readonly destroy$ = new Subject<void>();
constructor(private accountService: AccountService, private router: Router, protected modalService: NgbModal) {}
usuarioExtra: UsuarioExtra | null = null;
encuestas?: IEncuesta[];
isLoading = false;
faStar = faStar;
faCalendarAlt = faCalendarAlt;
faWindowMaximize = faWindowMaximize;
faPollH = faPollH;
notAccount: boolean = true;
constructor(
protected encuestaService: EncuestaService,
protected modalService: NgbModal,
protected categoriaService: CategoriaService,
protected usuarioExtraService: UsuarioExtraService,
protected activatedRoute: ActivatedRoute,
protected fb: FormBuilder,
protected accountService: AccountService,
protected router: Router
) {}
ngOnInit(): void {
this.accountService
.getAuthenticationState()
.pipe(takeUntil(this.destroy$))
.subscribe(account => (this.account = account));
.subscribe(account => {
if (account !== null) {
this.account = account;
this.notAccount = false;
} else {
this.notAccount = true;
}
});
this.loadAll();
}
login(): void {
@ -34,4 +75,43 @@ export class HomeComponent implements OnInit, OnDestroy {
this.destroy$.next();
this.destroy$.complete();
}
ngAfterViewInit(): void {}
trackId(index: number, item: IEncuesta): number {
return item.id!;
}
loadAll(): void {
this.isLoading = true;
this.encuestaService.query().subscribe(
(res: HttpResponse<IEncuesta[]>) => {
this.isLoading = false;
const tmpEncuestas = res.body ?? [];
this.encuestas = tmpEncuestas.filter(e => e.estado === 'ACTIVE' && e.acceso === 'PUBLIC');
},
() => {
this.isLoading = false;
}
);
}
openSurvey(event: any): void {
const surveyId = event.target.getAttribute('data-id');
this.router.navigate(['/encuesta', surveyId, 'edit']);
}
selectSurvey(event: any): void {
document.querySelectorAll('.ds-list--entity').forEach(e => {
e.classList.remove('active');
});
if (event.target.classList.contains('ds-list--entity')) {
event.target.classList.add('active');
}
}
counter(i: number) {
return new Array(i);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 KiB