commit
						fefd4ad879
					
				| 
						 | 
				
			
			@ -24,13 +24,13 @@ public class CacheConfiguration {
 | 
			
		|||
    private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration;
 | 
			
		||||
 | 
			
		||||
    public CacheConfiguration(JHipsterProperties jHipsterProperties) {
 | 
			
		||||
        JHipsterProperties.Cache.Ehcache ehcache = jHipsterProperties.getCache().getEhcache();
 | 
			
		||||
        //JHipsterProperties.Cache.Ehcache ehcache = jHipsterProperties.getCache().getEhcache();
 | 
			
		||||
 | 
			
		||||
        jcacheConfiguration =
 | 
			
		||||
            Eh107Configuration.fromEhcacheCacheConfiguration(
 | 
			
		||||
                CacheConfigurationBuilder
 | 
			
		||||
                    .newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.heap(ehcache.getMaxEntries()))
 | 
			
		||||
                    .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofSeconds(ehcache.getTimeToLiveSeconds())))
 | 
			
		||||
                    .newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.heap(100L))
 | 
			
		||||
                    .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofSeconds(1)))
 | 
			
		||||
                    .build()
 | 
			
		||||
            );
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -82,6 +82,7 @@ public class CacheConfiguration {
 | 
			
		|||
 | 
			
		||||
    private void createCache(javax.cache.CacheManager cm, String cacheName) {
 | 
			
		||||
        javax.cache.Cache<Object, Object> cache = cm.getCache(cacheName);
 | 
			
		||||
 | 
			
		||||
        if (cache != null) {
 | 
			
		||||
            cache.clear();
 | 
			
		||||
        } else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ public interface UserRepository extends JpaRepository<User, Long> {
 | 
			
		|||
    Optional<User> findOneByLogin(String login);
 | 
			
		||||
 | 
			
		||||
    @EntityGraph(attributePaths = "authorities")
 | 
			
		||||
    //@Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
 | 
			
		||||
    @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE)
 | 
			
		||||
    Optional<User> findOneWithAuthoritiesByLogin(String login);
 | 
			
		||||
 | 
			
		||||
    @EntityGraph(attributePaths = "authorities")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,6 +30,8 @@ public class MailService {
 | 
			
		|||
 | 
			
		||||
    private static final String USER = "user";
 | 
			
		||||
 | 
			
		||||
    private static final String CONTRASENNA = "contrasenna";
 | 
			
		||||
 | 
			
		||||
    private static final String BASE_URL = "baseUrl";
 | 
			
		||||
 | 
			
		||||
    private final JHipsterProperties jHipsterProperties;
 | 
			
		||||
| 
						 | 
				
			
			@ -93,6 +95,22 @@ public class MailService {
 | 
			
		|||
        sendEmail(user.getEmail(), subject, content, false, true);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Async
 | 
			
		||||
    public void sendEmailFromTemplateEncuesta(User user, String templateName, String titleKey, String contrasenna) {
 | 
			
		||||
        if (user.getEmail() == null) {
 | 
			
		||||
            log.debug("Email doesn't exist for user '{}'", user.getLogin());
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        Locale locale = Locale.forLanguageTag(user.getLangKey());
 | 
			
		||||
        Context context = new Context(locale);
 | 
			
		||||
        context.setVariable(CONTRASENNA, contrasenna);
 | 
			
		||||
        context.setVariable(USER, user);
 | 
			
		||||
        context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl());
 | 
			
		||||
        String content = templateEngine.process(templateName, context);
 | 
			
		||||
        String subject = messageSource.getMessage(titleKey, null, locale);
 | 
			
		||||
        sendEmail(user.getEmail(), subject, content, false, true);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Async
 | 
			
		||||
    public void sendActivationEmail(User user) {
 | 
			
		||||
        log.debug("Sending activation email to '{}'", user.getEmail());
 | 
			
		||||
| 
						 | 
				
			
			@ -128,4 +146,16 @@ public class MailService {
 | 
			
		|||
        log.debug("Sending reactivated  account mail to '{}'", user.getUser().getEmail());
 | 
			
		||||
        sendEmailFromTemplate(user.getUser(), "mail/reactivatedAccountEmail", "email.reactivation.title");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Async
 | 
			
		||||
    public void sendPublishedPrivateMail(UsuarioExtra user, String contrasenna) {
 | 
			
		||||
        log.debug("Sending reactivated  account mail to '{}'", user.getUser().getEmail());
 | 
			
		||||
        sendEmailFromTemplateEncuesta(user.getUser(), "mail/encuestaPrivadaEmail", "email.private.title", contrasenna);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Async
 | 
			
		||||
    public void sendPublishedPublicMail(UsuarioExtra user) {
 | 
			
		||||
        log.debug("Sending reactivated  account mail to '{}'", user.getUser().getEmail());
 | 
			
		||||
        sendEmailFromTemplate(user.getUser(), "mail/encuestaPublicaEmail", "email.public.title");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -394,12 +394,16 @@ public class UserService {
 | 
			
		|||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Optional<User> getUserWithAuthoritiesByLogin(String login) {
 | 
			
		||||
        return userRepository.findOneWithAuthoritiesByLogin(login);
 | 
			
		||||
        //cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).clear();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Optional<User> getUserWithAuthorities() {
 | 
			
		||||
        return SecurityUtils.getCurrentUserLogin().flatMap(userRepository::findOneWithAuthoritiesByLogin);
 | 
			
		||||
        //findOneWithAuthoritiesByLogin
 | 
			
		||||
        //cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).clear();
 | 
			
		||||
 | 
			
		||||
        //return user;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,8 +14,12 @@ import org.datasurvey.domain.EPreguntaAbierta;
 | 
			
		|||
import org.datasurvey.domain.EPreguntaCerrada;
 | 
			
		||||
import org.datasurvey.domain.EPreguntaCerradaOpcion;
 | 
			
		||||
import org.datasurvey.domain.Encuesta;
 | 
			
		||||
import org.datasurvey.domain.enumeration.AccesoEncuesta;
 | 
			
		||||
import org.datasurvey.repository.EncuestaRepository;
 | 
			
		||||
import org.datasurvey.service.*;
 | 
			
		||||
import org.datasurvey.service.EncuestaQueryService;
 | 
			
		||||
import org.datasurvey.service.EncuestaService;
 | 
			
		||||
import org.datasurvey.service.MailService;
 | 
			
		||||
import org.datasurvey.service.criteria.EncuestaCriteria;
 | 
			
		||||
import org.datasurvey.web.rest.errors.BadRequestAlertException;
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
| 
						 | 
				
			
			@ -46,6 +50,8 @@ public class EncuestaResource {
 | 
			
		|||
 | 
			
		||||
    private final EncuestaQueryService encuestaQueryService;
 | 
			
		||||
 | 
			
		||||
    private final MailService mailService;
 | 
			
		||||
 | 
			
		||||
    private final EPreguntaCerradaService ePreguntaCerradaService;
 | 
			
		||||
 | 
			
		||||
    private final EPreguntaAbiertaService ePreguntaAbiertaService;
 | 
			
		||||
| 
						 | 
				
			
			@ -56,6 +62,7 @@ public class EncuestaResource {
 | 
			
		|||
        EncuestaService encuestaService,
 | 
			
		||||
        EncuestaRepository encuestaRepository,
 | 
			
		||||
        EncuestaQueryService encuestaQueryService,
 | 
			
		||||
        MailService mailService,
 | 
			
		||||
        EPreguntaCerradaService ePreguntaCerradaService,
 | 
			
		||||
        EPreguntaAbiertaService ePreguntaAbiertaService,
 | 
			
		||||
        EPreguntaCerradaOpcionService ePreguntaCerradaOpcionService
 | 
			
		||||
| 
						 | 
				
			
			@ -63,6 +70,7 @@ public class EncuestaResource {
 | 
			
		|||
        this.encuestaService = encuestaService;
 | 
			
		||||
        this.encuestaRepository = encuestaRepository;
 | 
			
		||||
        this.encuestaQueryService = encuestaQueryService;
 | 
			
		||||
        this.mailService = mailService;
 | 
			
		||||
        this.ePreguntaCerradaService = ePreguntaCerradaService;
 | 
			
		||||
        this.ePreguntaAbiertaService = ePreguntaAbiertaService;
 | 
			
		||||
        this.ePreguntaCerradaOpcionService = ePreguntaCerradaOpcionService;
 | 
			
		||||
| 
						 | 
				
			
			@ -116,6 +124,12 @@ public class EncuestaResource {
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        Encuesta result = encuestaService.save(encuesta);
 | 
			
		||||
 | 
			
		||||
        if (result.getAcceso().equals(AccesoEncuesta.PRIVATE)) {
 | 
			
		||||
            mailService.sendPublishedPrivateMail(result.getUsuarioExtra(), result.getContrasenna());
 | 
			
		||||
        } else {
 | 
			
		||||
            mailService.sendPublishedPublicMail(result.getUsuarioExtra());
 | 
			
		||||
        }
 | 
			
		||||
        return ResponseEntity
 | 
			
		||||
            .ok()
 | 
			
		||||
            .headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, encuesta.getId().toString()))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -39,3 +39,16 @@ email.suspended.title=Your account has been suspended
 | 
			
		|||
email.suspended.greeting=Dear {0}
 | 
			
		||||
email.suspended.text1=Su cuenta en DatSurvey se encuentra temporalmente suspendida. Si cree que es un error por favor haga clic en el siguiente enlace para enviar una solicitud para reactivar su cuenta:
 | 
			
		||||
email.suspended.text2=Saludos,
 | 
			
		||||
 | 
			
		||||
#PublicEncuesta
 | 
			
		||||
email.public.title=Su encuesta ha sido publicada
 | 
			
		||||
email.public.greeting=¡Felicidades {0}!
 | 
			
		||||
email.public.text1=Su encuesta ha sido publicada de manera publica
 | 
			
		||||
email.public.text2=Saludos,
 | 
			
		||||
 | 
			
		||||
#PrivateEncuesta
 | 
			
		||||
email.private.title=Su encuesta ha sido publicada de manera privada
 | 
			
		||||
email.private.greeting=¡Felicidades {0}!
 | 
			
		||||
email.private.text1=Su encuesta ha sdo publicada de manera privada. Su contraseña de acceso es: {0}
 | 
			
		||||
email.private.text2=Saludos,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,3 +40,15 @@ email.suspended.title=Su cuenta ha sido suspendida
 | 
			
		|||
email.suspended.greeting=Estimado {0}
 | 
			
		||||
email.suspended.text1=Lamentamos informarle que su cuenta en DatSurvey se encuentra temporalmente suspendida. Si cree que es un error por favor responda a este correo
 | 
			
		||||
email.suspended.text2=Saludos,
 | 
			
		||||
 | 
			
		||||
#PublicEncuesta
 | 
			
		||||
email.public.title=Su encuesta ha sido publicada
 | 
			
		||||
email.public.greeting=¡Felicidades {0}!
 | 
			
		||||
email.public.text1=Su encuesta ha sido publicada de manera publica
 | 
			
		||||
email.public.text2=Saludos,
 | 
			
		||||
 | 
			
		||||
#PrivateEncuesta
 | 
			
		||||
email.private.title=Su encuesta ha sido publicada de manera privada
 | 
			
		||||
email.private.greeting=¡Felicidades {0}!
 | 
			
		||||
email.private.text1=Su encuesta ha sdo publicada de manera privada. Su contraseña de acceso es: {0}
 | 
			
		||||
email.private.text2=Saludos,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,319 @@
 | 
			
		|||
<!DOCTYPE html>
 | 
			
		||||
<html xmlns:th="http://www.thymeleaf.org" th:lang="${#locale.language}" lang="en">
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 | 
			
		||||
    <meta name="viewport" content="width=device-width" />
 | 
			
		||||
    <!-- Forcing initial-scale shouldn't be necessary -->
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
 | 
			
		||||
    <!-- Use the latest (edge) version of IE rendering engine -->
 | 
			
		||||
    <meta name="x-apple-disable-message-reformatting" />
 | 
			
		||||
    <!-- Disable auto-scale in iOS 10 Mail entirely -->
 | 
			
		||||
    <title th:text="#{email.private.title}">JHipster activation</title>
 | 
			
		||||
    <link rel="icon" th:href="@{|${baseUrl}/favicon.ico|}" />
 | 
			
		||||
    <link href="https://fonts.googleapis.com/css?family=NotoSansSP:300,400,700" rel="stylesheet" />
 | 
			
		||||
    <link rel="manifest" href="manifest.webapp" />
 | 
			
		||||
    <style>
 | 
			
		||||
      .bg_white {
 | 
			
		||||
        background: #ffffff;
 | 
			
		||||
      }
 | 
			
		||||
      .bg_light {
 | 
			
		||||
        background: #fafafa;
 | 
			
		||||
      }
 | 
			
		||||
      .bg_black {
 | 
			
		||||
        background: #000000;
 | 
			
		||||
      }
 | 
			
		||||
      .bg_dark {
 | 
			
		||||
        background: rgba(0, 0, 0, 0.8);
 | 
			
		||||
      }
 | 
			
		||||
      .email-section {
 | 
			
		||||
        padding: 2.5em;
 | 
			
		||||
      }
 | 
			
		||||
      /*BUTTON*/
 | 
			
		||||
      .btn {
 | 
			
		||||
        padding: 10px 15px;
 | 
			
		||||
        display: inline-block;
 | 
			
		||||
      }
 | 
			
		||||
      .btn.btn-primary {
 | 
			
		||||
        border-radius: 5px;
 | 
			
		||||
        background: #007bff;
 | 
			
		||||
        color: #ffffff;
 | 
			
		||||
      }
 | 
			
		||||
      .btn.btn-white {
 | 
			
		||||
        border-radius: 5px;
 | 
			
		||||
        background: #ffffff;
 | 
			
		||||
        color: #000000;
 | 
			
		||||
      }
 | 
			
		||||
      .btn.btn-white-outline {
 | 
			
		||||
        border-radius: 5px;
 | 
			
		||||
        background: transparent;
 | 
			
		||||
        border: 1px solid #fff;
 | 
			
		||||
        color: #fff;
 | 
			
		||||
      }
 | 
			
		||||
      .btn.btn-black-outline {
 | 
			
		||||
        border-radius: 0px;
 | 
			
		||||
        background: transparent;
 | 
			
		||||
        border: 2px solid #000;
 | 
			
		||||
        color: #000;
 | 
			
		||||
        font-weight: 700;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      h1,
 | 
			
		||||
      h2,
 | 
			
		||||
      h3,
 | 
			
		||||
      h4,
 | 
			
		||||
      h5,
 | 
			
		||||
      h6 {
 | 
			
		||||
        font-family: 'Lato', sans-serif;
 | 
			
		||||
        color: #000000;
 | 
			
		||||
        margin-top: 0;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      body {
 | 
			
		||||
        font-family: 'Noto Sans JP', sans-serif;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
        font-size: 15px;
 | 
			
		||||
        line-height: 1.8;
 | 
			
		||||
        color: rgba(0, 0, 0, 0.4);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      a {
 | 
			
		||||
        color: #30e3ca;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      table {
 | 
			
		||||
      }
 | 
			
		||||
      /*LOGO*/
 | 
			
		||||
 | 
			
		||||
      .logo h1 {
 | 
			
		||||
        margin: 0;
 | 
			
		||||
      }
 | 
			
		||||
      .logo h1 a {
 | 
			
		||||
        color: #30e3ca;
 | 
			
		||||
        font-size: 24px;
 | 
			
		||||
        font-weight: 700;
 | 
			
		||||
        font-family: 'Lato', sans-serif;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /*HERO*/
 | 
			
		||||
      .hero {
 | 
			
		||||
        position: relative;
 | 
			
		||||
        z-index: 0;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .hero .text {
 | 
			
		||||
        color: rgba(0, 0, 0, 0.3);
 | 
			
		||||
      }
 | 
			
		||||
      .hero .text h2 {
 | 
			
		||||
        color: #000;
 | 
			
		||||
        font-size: 40px;
 | 
			
		||||
        margin-bottom: 0;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
        line-height: 1.4;
 | 
			
		||||
      }
 | 
			
		||||
      .hero .text h3 {
 | 
			
		||||
        font-size: 24px;
 | 
			
		||||
        font-weight: 300;
 | 
			
		||||
      }
 | 
			
		||||
      .hero .text h2 span {
 | 
			
		||||
        font-weight: 600;
 | 
			
		||||
        color: #30e3ca;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /*HEADING SECTION*/
 | 
			
		||||
      .heading-section {
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section h2 {
 | 
			
		||||
        color: #000000;
 | 
			
		||||
        font-size: 28px;
 | 
			
		||||
        margin-top: 0;
 | 
			
		||||
        line-height: 1.4;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section .subheading {
 | 
			
		||||
        margin-bottom: 20px !important;
 | 
			
		||||
        display: inline-block;
 | 
			
		||||
        font-size: 13px;
 | 
			
		||||
        text-transform: uppercase;
 | 
			
		||||
        letter-spacing: 2px;
 | 
			
		||||
        color: rgba(0, 0, 0, 0.4);
 | 
			
		||||
        position: relative;
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section .subheading::after {
 | 
			
		||||
        position: absolute;
 | 
			
		||||
        left: 0;
 | 
			
		||||
        right: 0;
 | 
			
		||||
        bottom: -10px;
 | 
			
		||||
        content: '';
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        height: 2px;
 | 
			
		||||
        background: #30e3ca;
 | 
			
		||||
        margin: 0 auto;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .heading-section-white {
 | 
			
		||||
        color: rgba(255, 255, 255, 0.8);
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section-white h2 {
 | 
			
		||||
        /*font-family: ;*/
 | 
			
		||||
        line-height: 1;
 | 
			
		||||
        padding-bottom: 0;
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section-white h2 {
 | 
			
		||||
        color: #ffffff;
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section-white .subheading {
 | 
			
		||||
        margin-bottom: 0;
 | 
			
		||||
        display: inline-block;
 | 
			
		||||
        font-size: 13px;
 | 
			
		||||
        text-transform: uppercase;
 | 
			
		||||
        letter-spacing: 2px;
 | 
			
		||||
        color: rgba(255, 255, 255, 0.4);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      ul.social {
 | 
			
		||||
        padding: 0;
 | 
			
		||||
      }
 | 
			
		||||
      ul.social li {
 | 
			
		||||
        display: inline-block;
 | 
			
		||||
        margin-right: 10px;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .footer {
 | 
			
		||||
        border-top: 1px solid rgba(0, 0, 0, 0.05);
 | 
			
		||||
        color: rgba(0, 0, 0, 0.5);
 | 
			
		||||
      }
 | 
			
		||||
      .footer .heading {
 | 
			
		||||
        color: #000;
 | 
			
		||||
        font-size: 20px;
 | 
			
		||||
      }
 | 
			
		||||
      .footer ul {
 | 
			
		||||
        margin: 0;
 | 
			
		||||
        padding: 0;
 | 
			
		||||
      }
 | 
			
		||||
      .footer ul li {
 | 
			
		||||
        list-style: none;
 | 
			
		||||
        margin-bottom: 10px;
 | 
			
		||||
      }
 | 
			
		||||
      .footer ul li a {
 | 
			
		||||
        color: rgba(0, 0, 0, 1);
 | 
			
		||||
      }
 | 
			
		||||
    </style>
 | 
			
		||||
  </head>
 | 
			
		||||
 | 
			
		||||
  <body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f1f1f1">
 | 
			
		||||
    <center style="width: 100%; background-color: #f1f1f1">
 | 
			
		||||
      <div
 | 
			
		||||
        style="
 | 
			
		||||
          display: none;
 | 
			
		||||
          font-size: 1px;
 | 
			
		||||
          max-height: 0px;
 | 
			
		||||
          max-width: 0px;
 | 
			
		||||
          opacity: 0;
 | 
			
		||||
          overflow: hidden;
 | 
			
		||||
          mso-hide: all;
 | 
			
		||||
          font-family: sans-serif;
 | 
			
		||||
        "
 | 
			
		||||
      >
 | 
			
		||||
        ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ 
 | 
			
		||||
      </div>
 | 
			
		||||
      <div style="max-width: 600px; margin: 0 auto" class="email-container">
 | 
			
		||||
        <!-- BEGIN BODY -->
 | 
			
		||||
        <table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td valign="top" class="bg_white" style="padding: 1em 2.5em 0 2.5em">
 | 
			
		||||
              <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td class="logo" style="text-align: center">
 | 
			
		||||
                    <h1>
 | 
			
		||||
                      <a href="#"
 | 
			
		||||
                        ><img
 | 
			
		||||
                          src="https://res.cloudinary.com/marielascloud/image/upload/v1626333881/DataSurveyLogo2_smr2ok.png"
 | 
			
		||||
                          alt=""
 | 
			
		||||
                          width="300"
 | 
			
		||||
                      /></a>
 | 
			
		||||
                    </h1>
 | 
			
		||||
                  </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
              </table>
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <!-- end tr -->
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td valign="middle" class="hero bg_white" style="padding: 3em 0 2em 0">
 | 
			
		||||
              <img
 | 
			
		||||
                src="https://res.cloudinary.com/marielascloud/image/upload/v1626333882/email_v7pjtv.png"
 | 
			
		||||
                alt=""
 | 
			
		||||
                style="width: 300px; max-width: 600px; height: auto; margin: auto; display: block"
 | 
			
		||||
              />
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <!-- end tr -->
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td valign="middle" class="hero bg_white" style="padding: 2em 0 4em 0">
 | 
			
		||||
              <table>
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td>
 | 
			
		||||
                    <div class="text" style="padding: 0 2.5em; text-align: center">
 | 
			
		||||
                      <h2 th:text="#{email.private.greeting(${user.login})}">¡Hola!</h2>
 | 
			
		||||
                      <h3 th:text="#{email.private.text1(${contrasenna})}">
 | 
			
		||||
                        Your JHipster account has been created, please click on the URL below to activate it:
 | 
			
		||||
                      </h3>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="text" style="padding: 1em 2.5em; text-align: center">
 | 
			
		||||
                      <p>
 | 
			
		||||
                        <span th:text="#{email.private.text2}">Regards, </span>
 | 
			
		||||
                        <br />
 | 
			
		||||
                        <em th:text="#{email.signature}">JHipster.</em>
 | 
			
		||||
                      </p>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
              </table>
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <!-- end tr -->
 | 
			
		||||
          <!-- 1 Column Text + Button : END -->
 | 
			
		||||
        </table>
 | 
			
		||||
        <table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td valign="middle" class="bg_light footer email-section">
 | 
			
		||||
              <table>
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td valign="top" width="33.333%" style="padding-top: 20px">
 | 
			
		||||
                    <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
 | 
			
		||||
                      <tr>
 | 
			
		||||
                        <td style="text-align: left; padding-right: 10px">
 | 
			
		||||
                          <h3 class="heading">Acerca de</h3>
 | 
			
		||||
                          <p>DataSurvey es su compañero más cercano para poder recolectar información valiosa para usted</p>
 | 
			
		||||
                        </td>
 | 
			
		||||
                      </tr>
 | 
			
		||||
                    </table>
 | 
			
		||||
                  </td>
 | 
			
		||||
                  <td valign="top" width="33.333%" style="padding-top: 20px">
 | 
			
		||||
                    <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
 | 
			
		||||
                      <tr>
 | 
			
		||||
                        <td style="text-align: left; padding-left: 5px; padding-right: 5px">
 | 
			
		||||
                          <h3 class="heading">Información de contacto</h3>
 | 
			
		||||
                          <ul>
 | 
			
		||||
                            <li><span href="mailto:datasurveyapp@gmail.com" class="text">datasurveyapp@gmail.com</span></li>
 | 
			
		||||
                          </ul>
 | 
			
		||||
                        </td>
 | 
			
		||||
                      </tr>
 | 
			
		||||
                    </table>
 | 
			
		||||
                  </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
              </table>
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <!-- end: tr -->
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td class="bg_light" style="text-align: center">
 | 
			
		||||
              <p><a href="https://datasurvey.org" style="color: rgba(0, 0, 0, 0.8)">DataSurvey.org</a></p>
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
      </div>
 | 
			
		||||
    </center>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,319 @@
 | 
			
		|||
<!DOCTYPE html>
 | 
			
		||||
<html xmlns:th="http://www.thymeleaf.org" th:lang="${#locale.language}" lang="en">
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 | 
			
		||||
    <meta name="viewport" content="width=device-width" />
 | 
			
		||||
    <!-- Forcing initial-scale shouldn't be necessary -->
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
 | 
			
		||||
    <!-- Use the latest (edge) version of IE rendering engine -->
 | 
			
		||||
    <meta name="x-apple-disable-message-reformatting" />
 | 
			
		||||
    <!-- Disable auto-scale in iOS 10 Mail entirely -->
 | 
			
		||||
    <title th:text="#{email.public.title}">JHipster activation</title>
 | 
			
		||||
    <link rel="icon" th:href="@{|${baseUrl}/favicon.ico|}" />
 | 
			
		||||
    <link href="https://fonts.googleapis.com/css?family=NotoSansSP:300,400,700" rel="stylesheet" />
 | 
			
		||||
    <link rel="manifest" href="manifest.webapp" />
 | 
			
		||||
    <style>
 | 
			
		||||
      .bg_white {
 | 
			
		||||
        background: #ffffff;
 | 
			
		||||
      }
 | 
			
		||||
      .bg_light {
 | 
			
		||||
        background: #fafafa;
 | 
			
		||||
      }
 | 
			
		||||
      .bg_black {
 | 
			
		||||
        background: #000000;
 | 
			
		||||
      }
 | 
			
		||||
      .bg_dark {
 | 
			
		||||
        background: rgba(0, 0, 0, 0.8);
 | 
			
		||||
      }
 | 
			
		||||
      .email-section {
 | 
			
		||||
        padding: 2.5em;
 | 
			
		||||
      }
 | 
			
		||||
      /*BUTTON*/
 | 
			
		||||
      .btn {
 | 
			
		||||
        padding: 10px 15px;
 | 
			
		||||
        display: inline-block;
 | 
			
		||||
      }
 | 
			
		||||
      .btn.btn-primary {
 | 
			
		||||
        border-radius: 5px;
 | 
			
		||||
        background: #007bff;
 | 
			
		||||
        color: #ffffff;
 | 
			
		||||
      }
 | 
			
		||||
      .btn.btn-white {
 | 
			
		||||
        border-radius: 5px;
 | 
			
		||||
        background: #ffffff;
 | 
			
		||||
        color: #000000;
 | 
			
		||||
      }
 | 
			
		||||
      .btn.btn-white-outline {
 | 
			
		||||
        border-radius: 5px;
 | 
			
		||||
        background: transparent;
 | 
			
		||||
        border: 1px solid #fff;
 | 
			
		||||
        color: #fff;
 | 
			
		||||
      }
 | 
			
		||||
      .btn.btn-black-outline {
 | 
			
		||||
        border-radius: 0px;
 | 
			
		||||
        background: transparent;
 | 
			
		||||
        border: 2px solid #000;
 | 
			
		||||
        color: #000;
 | 
			
		||||
        font-weight: 700;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      h1,
 | 
			
		||||
      h2,
 | 
			
		||||
      h3,
 | 
			
		||||
      h4,
 | 
			
		||||
      h5,
 | 
			
		||||
      h6 {
 | 
			
		||||
        font-family: 'Lato', sans-serif;
 | 
			
		||||
        color: #000000;
 | 
			
		||||
        margin-top: 0;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      body {
 | 
			
		||||
        font-family: 'Noto Sans JP', sans-serif;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
        font-size: 15px;
 | 
			
		||||
        line-height: 1.8;
 | 
			
		||||
        color: rgba(0, 0, 0, 0.4);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      a {
 | 
			
		||||
        color: #30e3ca;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      table {
 | 
			
		||||
      }
 | 
			
		||||
      /*LOGO*/
 | 
			
		||||
 | 
			
		||||
      .logo h1 {
 | 
			
		||||
        margin: 0;
 | 
			
		||||
      }
 | 
			
		||||
      .logo h1 a {
 | 
			
		||||
        color: #30e3ca;
 | 
			
		||||
        font-size: 24px;
 | 
			
		||||
        font-weight: 700;
 | 
			
		||||
        font-family: 'Lato', sans-serif;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /*HERO*/
 | 
			
		||||
      .hero {
 | 
			
		||||
        position: relative;
 | 
			
		||||
        z-index: 0;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .hero .text {
 | 
			
		||||
        color: rgba(0, 0, 0, 0.3);
 | 
			
		||||
      }
 | 
			
		||||
      .hero .text h2 {
 | 
			
		||||
        color: #000;
 | 
			
		||||
        font-size: 40px;
 | 
			
		||||
        margin-bottom: 0;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
        line-height: 1.4;
 | 
			
		||||
      }
 | 
			
		||||
      .hero .text h3 {
 | 
			
		||||
        font-size: 24px;
 | 
			
		||||
        font-weight: 300;
 | 
			
		||||
      }
 | 
			
		||||
      .hero .text h2 span {
 | 
			
		||||
        font-weight: 600;
 | 
			
		||||
        color: #30e3ca;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /*HEADING SECTION*/
 | 
			
		||||
      .heading-section {
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section h2 {
 | 
			
		||||
        color: #000000;
 | 
			
		||||
        font-size: 28px;
 | 
			
		||||
        margin-top: 0;
 | 
			
		||||
        line-height: 1.4;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section .subheading {
 | 
			
		||||
        margin-bottom: 20px !important;
 | 
			
		||||
        display: inline-block;
 | 
			
		||||
        font-size: 13px;
 | 
			
		||||
        text-transform: uppercase;
 | 
			
		||||
        letter-spacing: 2px;
 | 
			
		||||
        color: rgba(0, 0, 0, 0.4);
 | 
			
		||||
        position: relative;
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section .subheading::after {
 | 
			
		||||
        position: absolute;
 | 
			
		||||
        left: 0;
 | 
			
		||||
        right: 0;
 | 
			
		||||
        bottom: -10px;
 | 
			
		||||
        content: '';
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        height: 2px;
 | 
			
		||||
        background: #30e3ca;
 | 
			
		||||
        margin: 0 auto;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .heading-section-white {
 | 
			
		||||
        color: rgba(255, 255, 255, 0.8);
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section-white h2 {
 | 
			
		||||
        /*font-family: ;*/
 | 
			
		||||
        line-height: 1;
 | 
			
		||||
        padding-bottom: 0;
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section-white h2 {
 | 
			
		||||
        color: #ffffff;
 | 
			
		||||
      }
 | 
			
		||||
      .heading-section-white .subheading {
 | 
			
		||||
        margin-bottom: 0;
 | 
			
		||||
        display: inline-block;
 | 
			
		||||
        font-size: 13px;
 | 
			
		||||
        text-transform: uppercase;
 | 
			
		||||
        letter-spacing: 2px;
 | 
			
		||||
        color: rgba(255, 255, 255, 0.4);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      ul.social {
 | 
			
		||||
        padding: 0;
 | 
			
		||||
      }
 | 
			
		||||
      ul.social li {
 | 
			
		||||
        display: inline-block;
 | 
			
		||||
        margin-right: 10px;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .footer {
 | 
			
		||||
        border-top: 1px solid rgba(0, 0, 0, 0.05);
 | 
			
		||||
        color: rgba(0, 0, 0, 0.5);
 | 
			
		||||
      }
 | 
			
		||||
      .footer .heading {
 | 
			
		||||
        color: #000;
 | 
			
		||||
        font-size: 20px;
 | 
			
		||||
      }
 | 
			
		||||
      .footer ul {
 | 
			
		||||
        margin: 0;
 | 
			
		||||
        padding: 0;
 | 
			
		||||
      }
 | 
			
		||||
      .footer ul li {
 | 
			
		||||
        list-style: none;
 | 
			
		||||
        margin-bottom: 10px;
 | 
			
		||||
      }
 | 
			
		||||
      .footer ul li a {
 | 
			
		||||
        color: rgba(0, 0, 0, 1);
 | 
			
		||||
      }
 | 
			
		||||
    </style>
 | 
			
		||||
  </head>
 | 
			
		||||
 | 
			
		||||
  <body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f1f1f1">
 | 
			
		||||
    <center style="width: 100%; background-color: #f1f1f1">
 | 
			
		||||
      <div
 | 
			
		||||
        style="
 | 
			
		||||
          display: none;
 | 
			
		||||
          font-size: 1px;
 | 
			
		||||
          max-height: 0px;
 | 
			
		||||
          max-width: 0px;
 | 
			
		||||
          opacity: 0;
 | 
			
		||||
          overflow: hidden;
 | 
			
		||||
          mso-hide: all;
 | 
			
		||||
          font-family: sans-serif;
 | 
			
		||||
        "
 | 
			
		||||
      >
 | 
			
		||||
        ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ 
 | 
			
		||||
      </div>
 | 
			
		||||
      <div style="max-width: 600px; margin: 0 auto" class="email-container">
 | 
			
		||||
        <!-- BEGIN BODY -->
 | 
			
		||||
        <table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td valign="top" class="bg_white" style="padding: 1em 2.5em 0 2.5em">
 | 
			
		||||
              <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td class="logo" style="text-align: center">
 | 
			
		||||
                    <h1>
 | 
			
		||||
                      <a href="#"
 | 
			
		||||
                        ><img
 | 
			
		||||
                          src="https://res.cloudinary.com/marielascloud/image/upload/v1626333881/DataSurveyLogo2_smr2ok.png"
 | 
			
		||||
                          alt=""
 | 
			
		||||
                          width="300"
 | 
			
		||||
                      /></a>
 | 
			
		||||
                    </h1>
 | 
			
		||||
                  </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
              </table>
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <!-- end tr -->
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td valign="middle" class="hero bg_white" style="padding: 3em 0 2em 0">
 | 
			
		||||
              <img
 | 
			
		||||
                src="https://res.cloudinary.com/marielascloud/image/upload/v1626333882/email_v7pjtv.png"
 | 
			
		||||
                alt=""
 | 
			
		||||
                style="width: 300px; max-width: 600px; height: auto; margin: auto; display: block"
 | 
			
		||||
              />
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <!-- end tr -->
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td valign="middle" class="hero bg_white" style="padding: 2em 0 4em 0">
 | 
			
		||||
              <table>
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td>
 | 
			
		||||
                    <div class="text" style="padding: 0 2.5em; text-align: center">
 | 
			
		||||
                      <h2 th:text="#{email.public.greeting(${user.login})}">¡Hola!</h2>
 | 
			
		||||
                      <h3 th:text="#{email.public.text1}">
 | 
			
		||||
                        Your JHipster account has been created, please click on the URL below to activate it:
 | 
			
		||||
                      </h3>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="text" style="padding: 1em 2.5em; text-align: center">
 | 
			
		||||
                      <p>
 | 
			
		||||
                        <span th:text="#{email.public.text2}">Regards, </span>
 | 
			
		||||
                        <br />
 | 
			
		||||
                        <em th:text="#{email.signature}">JHipster.</em>
 | 
			
		||||
                      </p>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
              </table>
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <!-- end tr -->
 | 
			
		||||
          <!-- 1 Column Text + Button : END -->
 | 
			
		||||
        </table>
 | 
			
		||||
        <table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto">
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td valign="middle" class="bg_light footer email-section">
 | 
			
		||||
              <table>
 | 
			
		||||
                <tr>
 | 
			
		||||
                  <td valign="top" width="33.333%" style="padding-top: 20px">
 | 
			
		||||
                    <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
 | 
			
		||||
                      <tr>
 | 
			
		||||
                        <td style="text-align: left; padding-right: 10px">
 | 
			
		||||
                          <h3 class="heading">Acerca de</h3>
 | 
			
		||||
                          <p>DataSurvey es su compañero más cercano para poder recolectar información valiosa para usted</p>
 | 
			
		||||
                        </td>
 | 
			
		||||
                      </tr>
 | 
			
		||||
                    </table>
 | 
			
		||||
                  </td>
 | 
			
		||||
                  <td valign="top" width="33.333%" style="padding-top: 20px">
 | 
			
		||||
                    <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
 | 
			
		||||
                      <tr>
 | 
			
		||||
                        <td style="text-align: left; padding-left: 5px; padding-right: 5px">
 | 
			
		||||
                          <h3 class="heading">Información de contacto</h3>
 | 
			
		||||
                          <ul>
 | 
			
		||||
                            <li><span href="mailto:datasurveyapp@gmail.com" class="text">datasurveyapp@gmail.com</span></li>
 | 
			
		||||
                          </ul>
 | 
			
		||||
                        </td>
 | 
			
		||||
                      </tr>
 | 
			
		||||
                    </table>
 | 
			
		||||
                  </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
              </table>
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
          <!-- end: tr -->
 | 
			
		||||
          <tr>
 | 
			
		||||
            <td class="bg_light" style="text-align: center">
 | 
			
		||||
              <p><a href="https://datasurvey.org" style="color: rgba(0, 0, 0, 0.8)">DataSurvey.org</a></p>
 | 
			
		||||
            </td>
 | 
			
		||||
          </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
      </div>
 | 
			
		||||
    </center>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
| 
						 | 
				
			
			@ -72,6 +72,7 @@ export class AccountService {
 | 
			
		|||
        shareReplay()
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return this.accountCache$;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,12 +19,17 @@
 | 
			
		|||
 | 
			
		||||
  </div>-->
 | 
			
		||||
 | 
			
		||||
  <div>
 | 
			
		||||
    <jhi-alert class="alert-success"></jhi-alert>
 | 
			
		||||
  <div
 | 
			
		||||
    *ngIf="success"
 | 
			
		||||
    class="alert alert-success alert-dismissible fade show"
 | 
			
		||||
    role="alert"
 | 
			
		||||
    jhiTranslate="dataSurveyApp.categoria.delete.success"
 | 
			
		||||
  >
 | 
			
		||||
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
 | 
			
		||||
      <span aria-hidden="true">×</span>
 | 
			
		||||
    </button>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
  <div class="alert alert-success" *ngIf="success" jhiTranslate="dataSurveyApp.categoria.delete.success"></div>
 | 
			
		||||
 | 
			
		||||
  <div class="alert alert-warning" id="no-result" *ngIf="categorias?.length === 0">
 | 
			
		||||
    <span jhiTranslate="dataSurveyApp.categoria.home.notFound">No categorias found</span>
 | 
			
		||||
  </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,8 @@
 | 
			
		|||
<form class="ds-form" *ngIf="encuesta" name="deleteForm" (ngSubmit)="confirmDelete(encuesta!)">
 | 
			
		||||
  <div class="modal-header">
 | 
			
		||||
    <h2 class="ds-title" data-cy="encuestaDeleteDialogHeading" jhiTranslate="entity.delete.title">Confirm delete operation</h2>
 | 
			
		||||
    <!-- <h2 class="ds-title" data-cy="encuestaDeleteDialogHeading" jhiTranslate="entity.delete.title">Confirm delete operation</h2>
 | 
			
		||||
 | 
			
		||||
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="cancel()">×</button>
 | 
			
		||||
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="cancel()">×</button>-->
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
  <div class="modal-body">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,8 @@ import { IEncuesta } from '../encuesta.model';
 | 
			
		|||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
 | 
			
		||||
import { EncuestaService } from '../service/encuesta.service';
 | 
			
		||||
import { EstadoEncuesta } from '../../enumerations/estado-encuesta.model';
 | 
			
		||||
import { AccesoEncuesta } from '../../enumerations/acceso-encuesta.model';
 | 
			
		||||
import { passwordResetFinishRoute } from '../../../account/password-reset/finish/password-reset-finish.route';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
  selector: 'jhi-encuesta-publish-dialog',
 | 
			
		||||
| 
						 | 
				
			
			@ -24,10 +26,25 @@ export class EncuestaPublishDialogComponent implements OnInit {
 | 
			
		|||
      encuesta.estado = EstadoEncuesta.ACTIVE;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (encuesta.acceso === AccesoEncuesta.PRIVATE) {
 | 
			
		||||
      encuesta.contrasenna = this.generatePassword();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    this.encuestaService.update(encuesta).subscribe(() => {
 | 
			
		||||
      this.activeModal.close('published');
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  generatePassword(): string {
 | 
			
		||||
    debugger;
 | 
			
		||||
    const alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
 | 
			
		||||
 | 
			
		||||
    let password = '';
 | 
			
		||||
    for (let i = 0; i < 5; i++) {
 | 
			
		||||
      password += alpha.charAt(Math.floor(Math.random() * alpha.length));
 | 
			
		||||
    }
 | 
			
		||||
    return password;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ngOnInit(): void {}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
    <div class="d-flex flex-sm-row flex-column justify-content-between align-items-center">
 | 
			
		||||
      <div>
 | 
			
		||||
        <span class="ds-title" jhiTranslate="dataSurveyApp.encuesta.home.title">Encuestas</span>
 | 
			
		||||
        <p class="ds-subtitle">Cree encuestas y publiquelas mundialmente.</p>
 | 
			
		||||
        <p class="ds-subtitle">Cree encuestas y publiquelas mundialmente</p>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -149,7 +149,8 @@ export class EncuestaComponent implements OnInit, AfterViewInit {
 | 
			
		|||
              this.isLoading = false;
 | 
			
		||||
              const tmpEncuestas = res.body ?? [];
 | 
			
		||||
              if (this.isAdmin()) {
 | 
			
		||||
                this.encuestas = tmpEncuestas;
 | 
			
		||||
                this.encuestas = tmpEncuestas.filter(e => e.estado !== EstadoEncuesta.DELETED);
 | 
			
		||||
 | 
			
		||||
                this.encuestas.forEach(e => {
 | 
			
		||||
                  e.usuarioExtra = this.usuarioExtrasSharedCollection?.find(pU => pU.id == e.usuarioExtra?.id);
 | 
			
		||||
                });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -56,7 +56,7 @@ export class EncuestaService {
 | 
			
		|||
      .get<any>(`${this.resourceUrl}/preguntas-opciones/${id}`, { observe: 'response' })
 | 
			
		||||
      .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  findEncuesta(id: number): Observable<IEncuesta> {
 | 
			
		||||
    return this.http.get<IEncuesta>(`${this.resourceUrl}/${id}`);
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,12 @@
 | 
			
		|||
 | 
			
		||||
  <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
 | 
			
		||||
  <jhi-alert></jhi-alert>
 | 
			
		||||
  <div *ngIf="successChange" class="alert alert-success alert-dismissible fade show" role="alert">
 | 
			
		||||
    El estado del usuario fue modificado correctamente
 | 
			
		||||
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
 | 
			
		||||
      <span aria-hidden="true">×</span>
 | 
			
		||||
    </button>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
  <div class="alert alert-warning" id="no-result" *ngIf="usuarioExtras?.length === 0">
 | 
			
		||||
    <span jhiTranslate="dataSurveyApp.usuarioExtra.home.notFound">No usuarioExtras found</span>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,7 @@ export class UsuarioExtraComponent implements OnInit {
 | 
			
		|||
  usuarioExtras?: IUsuarioExtra[];
 | 
			
		||||
  publicUsers?: IUser[];
 | 
			
		||||
  isLoading = false;
 | 
			
		||||
  successChange = false;
 | 
			
		||||
  public searchNombreUsuario: string;
 | 
			
		||||
  public searchEstadoUsuario: string;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -80,6 +81,7 @@ export class UsuarioExtraComponent implements OnInit {
 | 
			
		|||
    // unsubscribe not needed because closed completes on modal close
 | 
			
		||||
    modalRef.closed.subscribe(reason => {
 | 
			
		||||
      if (reason === 'deleted') {
 | 
			
		||||
        this.successChange = true;
 | 
			
		||||
        this.loadAll();
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,16 +7,16 @@
 | 
			
		|||
        /></a>
 | 
			
		||||
 | 
			
		||||
        <div class="col-6" style="text-align: end">
 | 
			
		||||
          <a href="#">
 | 
			
		||||
            <button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Encuestas</button>
 | 
			
		||||
          </a>
 | 
			
		||||
          <!--<a href="#">
 | 
			
		||||
            <button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Encuestas</button>
 | 
			
		||||
          </a>-->
 | 
			
		||||
          <a href="login" [hidden]="!notAccount">
 | 
			
		||||
            <button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Iniciar Sesión</button>
 | 
			
		||||
          </a>
 | 
			
		||||
 | 
			
		||||
          <a href="account/register" [hidden]="!notAccount">
 | 
			
		||||
            <button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Registrarse</button>
 | 
			
		||||
          </a>
 | 
			
		||||
          <!--<a href="account/register" [hidden]="!notAccount">
 | 
			
		||||
            <button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Registrarse</button>
 | 
			
		||||
          </a>-->
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -32,7 +32,7 @@
 | 
			
		|||
              <div data-aos="fade-up">
 | 
			
		||||
                <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.
 | 
			
		||||
                  Somos su mejor aliado para la recolección de información, a través de nuestra plataforma
 | 
			
		||||
                </h5>
 | 
			
		||||
                <div class="row" [hidden]="!notAccount">
 | 
			
		||||
                  <div class="col">
 | 
			
		||||
| 
						 | 
				
			
			@ -68,18 +68,21 @@
 | 
			
		|||
        <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 class="fa fa-droplet"></i></div>
 | 
			
		||||
            <h2>El Mejor diseño</h2>
 | 
			
		||||
            <p class="mb-0">Tenemos el mejor diseño para que pueda disfrutar visualmente de la plataforma.</p>
 | 
			
		||||
            <h2>Diseño amigable</h2>
 | 
			
		||||
            <hr />
 | 
			
		||||
            <p class="mb-0">Contamos con una interfaz fácil de utilizar</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 class="fa fa-code"></i></div>
 | 
			
		||||
            <h2>Fácil uso</h2>
 | 
			
		||||
            <p class="mb-0">Contamos con una plataforma muy sencilla de usar.</p>
 | 
			
		||||
            <hr />
 | 
			
		||||
            <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 class="fa fa-truck"></i></div>
 | 
			
		||||
            <h2>Diverso contenido</h2>
 | 
			
		||||
            <p class="mb-0">Podrá encontrar y crear encuestas de diferentes categorías.</p>
 | 
			
		||||
            <hr />
 | 
			
		||||
            <p class="mb-0">Podrá encontrar y crear encuestas de diferentes categorías</p>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -144,7 +147,7 @@
 | 
			
		|||
          <div class="row">
 | 
			
		||||
            <div class="col">
 | 
			
		||||
              <a routerLink="#">
 | 
			
		||||
                <button class="ds-btn ds-btn--primary fw-500 ms-lg-4">Ver todas las encuestas</button>
 | 
			
		||||
                <button class="ds-btn ds-btn--primary fw-500 ms-lg-4 mb-4">Ver todas las encuestas</button>
 | 
			
		||||
              </a>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -179,7 +182,7 @@
 | 
			
		|||
                  aria-expanded="true"
 | 
			
		||||
                  aria-controls="collapseOne"
 | 
			
		||||
                >
 | 
			
		||||
                  ¿Qué métodos de pago estás disponibles en DataSurvey?
 | 
			
		||||
                  ¿Qué métodos de pago están disponibles en DataSurvey?
 | 
			
		||||
                </button>
 | 
			
		||||
              </h2>
 | 
			
		||||
            </a>
 | 
			
		||||
| 
						 | 
				
			
			@ -187,7 +190,7 @@
 | 
			
		|||
 | 
			
		||||
          <!-- 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 class="card-body">DataSurvey utiliza PayPal como método de pago para la compra de plantillas</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- Accordion card -->
 | 
			
		||||
| 
						 | 
				
			
			@ -223,7 +226,7 @@
 | 
			
		|||
          <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.
 | 
			
		||||
              cuenta en la plataforma
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -260,7 +263,7 @@
 | 
			
		|||
          <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.
 | 
			
		||||
              sin ninguna excepción, mientras que las encuestas privadas, necesitan de una clave para poder ser accesadas
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -74,13 +74,18 @@
 | 
			
		|||
              <p class="mb-4" style="color: rgba(146, 146, 146, 0.664)">Ingrese su correo electrónico y contraseña</p>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="alert alert-danger" *ngIf="error" jhiTranslate="login.messages.error.authentication" data-cy="loginError">
 | 
			
		||||
            <div
 | 
			
		||||
              class="alert alert-danger"
 | 
			
		||||
              *ngIf="error && !userSuspended"
 | 
			
		||||
              jhiTranslate="login.messages.error.authentication"
 | 
			
		||||
              data-cy="loginError"
 | 
			
		||||
            >
 | 
			
		||||
              <strong>Failed to sign in!</strong> Please check your credentials and try again.
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div
 | 
			
		||||
              class="alert alert-danger"
 | 
			
		||||
              *ngIf="userSuspended"
 | 
			
		||||
              *ngIf="userSuspended && !error"
 | 
			
		||||
              jhiTranslate="login.messages.error.userSuspended"
 | 
			
		||||
              data-cy="loginError"
 | 
			
		||||
            ></div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -81,6 +81,9 @@ export class LoginComponent implements OnInit, AfterViewInit {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  authenticacionGoogle(): void {
 | 
			
		||||
    this.error = false;
 | 
			
		||||
    this.userSuspended = false;
 | 
			
		||||
 | 
			
		||||
    this.loginService.login({ username: this.user.email, password: this.user.id, rememberMe: false }).subscribe(
 | 
			
		||||
      () => {
 | 
			
		||||
        this.authenticationError = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -123,6 +126,9 @@ export class LoginComponent implements OnInit, AfterViewInit {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  activateGoogle(): void {
 | 
			
		||||
    this.error = false;
 | 
			
		||||
    this.userSuspended = false;
 | 
			
		||||
 | 
			
		||||
    this.registerService
 | 
			
		||||
      .save({
 | 
			
		||||
        login: this.user.email,
 | 
			
		||||
| 
						 | 
				
			
			@ -145,6 +151,8 @@ export class LoginComponent implements OnInit, AfterViewInit {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  login(): void {
 | 
			
		||||
    this.error = false;
 | 
			
		||||
    this.userSuspended = false;
 | 
			
		||||
    debugger;
 | 
			
		||||
    this.loginService
 | 
			
		||||
      .login({
 | 
			
		||||
| 
						 | 
				
			
			@ -169,8 +177,14 @@ export class LoginComponent implements OnInit, AfterViewInit {
 | 
			
		|||
          }
 | 
			
		||||
          // }
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        response => this.processError(response)
 | 
			
		||||
        response => {
 | 
			
		||||
          debugger;
 | 
			
		||||
          if (response.status == 401 && response.error.detail == 'Bad credentials') {
 | 
			
		||||
            this.error = true;
 | 
			
		||||
          } else {
 | 
			
		||||
            this.processError(response);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@
 | 
			
		|||
      "updated": "Una encuesta ha sido actualizado con el identificador {{ param }}",
 | 
			
		||||
      "deleted": "Una encuesta ha sido eliminada con el identificador {{ param }}",
 | 
			
		||||
      "delete": {
 | 
			
		||||
        "question": "¿Seguro que quiere eliminar la encuesta {{ id }}?",
 | 
			
		||||
        "question": "¿Seguro que quiere eliminar la encuesta?",
 | 
			
		||||
        "deletequestion": "¿Seguro que quiere eliminar esta pregunta?",
 | 
			
		||||
        "deleteoption": "¿Seguro que quiere eliminar esta opción?"
 | 
			
		||||
      },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue