-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcupones.ejs
110 lines (106 loc) · 5.7 KB
/
cupones.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%- include ('header', {tituloweb: '¡Oh my dog! | Cupones'}); %>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</head>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: #dedede;
}
.coupon .kanan {
border-left: 1px dashed #ddd;
width: 40% !important;
position: relative;
}
.coupon .kanan .info::after,
.coupon .kanan .info::before {
content: '';
position: absolute;
width: 20px;
height: 20px;
background: #4998b0;
border-radius: 100%;
}
.coupon .kanan .info::before {
top: -10px;
left: -10px;
}
.coupon .kanan .info::after {
bottom: -10px;
left: -10px;
}
.coupon .time {
font-size: 1.6rem;
}
</style>
</head>
<body id="body">
<div class="card" style="width: 100%; margin-top: 10px;">
<h2 class="text-center">Cupones de descuento</h1>
</div>
<div class="container my-5">
<% if (cupones.length !== 0) { %>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
Los siguientes cupones solo pueden ser utilizados por: <strong><%= usuario.name %></strong> DNI: <strong><%= usuario.DNI %></strong>, verifique que la información sea correcta. <br> Para usarlos es necesario que la persona se acerque a la veterinaria
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<% } %>
<div class="row">
<% cupones.forEach(cupon => { %>
<div class="col-sm-6">
<div class="coupon bg-white rounded mb-3 d-flex justify-content-between">
<div class="kiri p-3">
<div class="icon-container ">
<div class="icon-container_box">
<% var icono = ""; %>
<% if ( cupon.monto_beneficio >= 0 && cupon.monto_beneficio <= 99) { %>
<% icono = "bi bi-coin"; %>
<% } else if ( cupon.monto_beneficio >= 100 && cupon.monto_beneficio <= 999) { %>
<% icono = "bi bi-cash-coin"; %>
<% } else if (cupon.monto_beneficio >= 1000) { %>
<% icono = "bi bi-piggy-bank"; %>
<% } %>
<i class="<%= icono %>" style="font-size: 55px;"></i>
</div>
</div>
</div>
<div class="tengah py-3 d-flex w-100 justify-content-start">
<div>
<h3 class="lead">Cupón de descuento</h3>
<span>Acercate a la veterinaria para usarlo</span>
</div>
</div>
<div class="kanan">
<div class="info m-3 d-flex align-items-center">
<div class="w-100">
<div class="block">
<span class="time font-weight-light">
<span style="<%= cupon.usado === true ? 'text-decoration: line-through;' : '' %>">$<%= cupon.monto_beneficio %></span>
</span>
<br>
<strong><%= cupon.usado === true ? 'Usado' : '' %></strong>
</div>
</div>
</div>
</div>
</div>
</div>
<% }); %>
<% if (cupones.length === 0) { %>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<strong>No tiene beneficios disponibles:</strong> Los beneficios se obtienen realizando donaciones en alguna campaña.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<% } %>
</div>
</div>
<div class="text-center"><a class="small" href="#" style="color: white;" onclick="history.back(); return false;">Volver</a></div>
</body>
</html>