Ruta de navegación
Pagas tus cuentas en Sencillito
Aviso mensaje mantencion
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing: ==> request.getParameter("convenioId") [in template "61606#61645#24572907" at line 29, column 11] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: valor = request.getParameter("conveni... [in template "61606#61645#24572907" at line 29, column 3] ----
1<style>
2
3:root {
4 --igt-font-family: "sencillito-proxima-nova", sans-serif;
5}
6
7 .igt-font-weight-700 {
8 font-weight: 700;
9 }
10
11 .igt-alert-info {
12 background:#CCDBFF;
13 }
14
15 .igt-alert-info p {
16 font-family: var(--igt-font-family);
17 color: #283a86
18 }
19 .igt-w-max-content {
20 width: max-content;
21 }
22</style>
23
24
25
26
27
28<#assign
29 valor = request.getParameter("convenioId")
30 instanceId = portletDisplay.getInstanceId()
31/>
32
33<script>
34// Creamos un objeto para almacenar los datos de alerta específicos de esta instancia
35window['alertData_${instanceId}'] = {
36 isLimitedAlert: false,
37 fechaHoraInicioAlerta: '',
38 fechaHoraFinAlerta: ''
39};
40</script>
41
42<#if Convenio.getSiblings()?has_content>
43 <#list Convenio.getSiblings() as cur_Convenio>
44 <#if valor == cur_Convenio.getData()>
45 <#if getterUtil.getBoolean(cur_Convenio.MostrarPorTiempoLimitado.getData())>
46 <script>
47 var alertData = window['alertData_${instanceId}'];
48 alertData.isLimitedAlert = true;
49 alertData.fechaHoraInicioAlerta = new Date('${cur_Convenio.FechaYHoraInicio.getData()}');
50 alertData.fechaHoraFinAlerta = new Date('${cur_Convenio.FechaYHoraFin.getData()}');
51 console.info('isLimitedAlert', alertData.isLimitedAlert);
52 </script>
53 </#if>
54 <div data-convenio-alert="${instanceId}" class="alert alert-primary mw-100 igt-w-max-content igt-alert-info igt-alert-info-mensaje d-none" role="alert">
55 ${cur_Convenio.Parrafo.getData()}
56 </div>
57 </#if>
58 </#list>
59</#if>
60
61<script>
62
63(() => {
64 Liferay.on('allPortletsReady', function() {
65 const container = document.querySelector('section.ppt-categorias');
66 const alerts = Array.from(document.querySelectorAll('[data-convenio-alert]'));
67 const alert = document.querySelector('[data-convenio-alert=${instanceId}]');
68 const alertData = window['alertData_${instanceId}'];
69
70 if (container) {
71 if (alert != null) {
72 const indice = alerts.findIndex(a => a === alert);
73 if (indice == 0) {
74 container.insertBefore(alert, container.firstChild);
75 } else {
76 container.append(alert);
77 }
78 }
79 }
80
81 if (alert && alert != null) {
82 const fechaHoraActualAlerta = new Date();
83 if (alertData.isLimitedAlert) {
84 if (fechaHoraActualAlerta >= alertData.fechaHoraInicioAlerta && fechaHoraActualAlerta <= alertData.fechaHoraFinAlerta) {
85 alert.classList.remove("d-none");
86 } else {
87 alert.classList.add("d-none");
88 }
89 } else {
90 alert.classList.add("d-none");
91 }
92 }
93 });
94})();
95
96</script>