-
Notifications
You must be signed in to change notification settings - Fork 0
/
next-visits.html
274 lines (248 loc) · 13.4 KB
/
next-visits.html
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<!DOCTYPE html>
<html data-theme="light" lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/full.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet" type="text/css" />
<!-- Notifications Notiflix -->
<link rel="stylesheet" href="./js/utils/notiflix-3.2.5.min.css" />
<script src="./js/utils/notiflix-3.2.5.min.js"></script>
<title>Visitas | Próximas</title>
</head>
<body style="background-color:#fefefe;">
<div class="drawer">
<input id="my-drawer" type="checkbox" class="drawer-toggle" />
<div class="drawer-content">
<div class="navbar bg-base-100 shadow-md">
<div class="flex-none">
<label for="my-drawer" class="btn btn-square btn-ghost">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
class="inline-block w-5 h-5 stroke-current">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</label>
</div>
<div class="flex-1">
<a class="normal-case text-xl">Menú</a>
</div>
<div class="flex-none">
<div class="tooltip tooltip-left" data-tip="cerrar sesión">
<button class="btn btn-square btn-ghost" id="btnLogout">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="inline-block w-5 h-5 stroke-current">>
<path stroke-linecap="round" stroke-linejoin="round"
d="M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M12 9l-3 3m0 0l3 3m-3-3h12.75" />
</svg>
</button>
</div>
</div>
</div>
<main>
<div class="container px-3 mx-auto grid md-auto h-auto">
<!-- Contenedor | Coloca tu contenido aquí -->
<br>
<div class="">
<div class="mb-6 flex justify-center items-center w-full">
<svg class="mr-4 drop-shadow-sm" style="width:32px;height:32px;color: #EB7063"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round"
d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0118 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3l1.5 1.5 3-3.75" />
</svg>
<h1 class="font-bold text-2xl drop-shadow-sm" style="color: #EB7063">Próximas visitas</h1>
</div>
<ul class="grid rounded-lg py-4 bg-white shadow-xl border-b border-gray-100 md:flex tabs lg:flex tabs">
<li class="flex-1 rounded-lg">
<a class="relative block p-4 mx-5" href="./completed-visits.html">
<div class="flex items-center justify-center sm:w-full">
<svg class="h-5 w-5 flex-shrink-0 text-gray-500" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round"
d="M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z" />
</svg>
<span class="ml-3 text-sm font-medium text-gray-900">Visitas completadas </span>
</div>
</a>
</li>
<li class="flex-1">
<a class="relative block p-4 mx-5" href="./pending-visits.html">
<div class="flex items-center justify-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 flex-shrink-0 text-gray-500" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z" />
</svg>
<span class="ml-3 text-sm font-medium text-gray-900">Visitas en proceso </span>
</div>
</a>
</li>
<li class="flex-1">
<a class="relative block p-4 mx-5" href="./next-visits.html">
<span class="absolute inset-x-0 -bottom-px h-px w-full bg-pink-600"></span>
<div class="flex items-center justify-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 flex-shrink-0 text-gray-500" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4" />
</svg>
<span class="ml-3 text-sm font-medium text-gray-900">Próximas visitas</span>
</div>
</a>
</li>
</ul>
<div class="grid justify-items-center" id="noContent">
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2" id="next-visits-generator">
<div class="card bg-base-100 shadow-xl mt-3 w-auto sm:flex-1 mx-3 sm:ml-0">
<div class="animate-pulse flex card-body">
<div class="btn-disabled rounded h-10"></div>
<div class="flex-1 space-y-3 py-1">
<div class="h-2 btn-disabled rounded"></div>
<div class="h-2 btn-disabled rounded col-span-2"></div>
<div class="space-y-3">
<div class="grid grid-cols-6 gap-4">
<div class="h-6 btn-disabled rounded col-span-2"></div>
<div class="h-6 btn-disabled rounded col-span-2"></div>
<div class="h-6 btn-disabled rounded col-span-2"></div>
</div>
</div>
</div>
</div>
</div>
<div class="card bg-base-100 shadow-xl mt-3 w-auto sm:flex-1 mx-3 sm:ml-0">
<div class="animate-pulse flex card-body">
<div class=" btn-disabled rounded h-10"></div>
<div class="flex-1 space-y-3 py-1">
<div class="h-2 btn-disabled rounded"></div>
<div class="h-2 btn-disabled rounded col-span-2"></div>
<div class="space-y-3">
<div class="grid grid-cols-6 gap-4">
<div class="h-6 btn-disabled rounded col-span-2"></div>
<div class="h-6 btn-disabled rounded col-span-2"></div>
<div class="h-6 btn-disabled rounded col-span-2"></div>
</div>
</div>
</div>
</div>
</div>
<div class="card bg-base-100 shadow-xl mt-3 w-auto sm:flex-1 mx-3 sm:ml-0" id="next-visits-generator">
<div class="animate-pulse flex card-body">
<div class=" btn-disabled rounded h-10"></div>
<div class="flex-1 space-y-3 py-1">
<div class="h-2 btn-disabled rounded"></div>
<div class="h-2 btn-disabled rounded col-span-2"></div>
<div class="space-y-3">
<div class="grid grid-cols-6 gap-4">
<div class="h-6 btn-disabled rounded col-span-2"></div>
<div class="h-6 btn-disabled rounded col-span-2"></div>
<div class="h-6 btn-disabled rounded col-span-2"></div>
</div>
</div>
</div>
</div>
</div>
<div class="card bg-base-100 shadow-xl mt-3 w-auto sm:flex-1 mx-3 sm:ml-0">
<div class="animate-pulse flex card-body">
<div class=" btn-disabled rounded h-10"></div>
<div class="flex-1 space-y-3 py-1">
<div class="h-2 btn-disabled rounded"></div>
<div class="h-2 btn-disabled rounded col-span-2"></div>
<div class="space-y-3">
<div class="grid grid-cols-6 gap-4">
<div class="h-6 btn-disabled rounded col-span-2"></div>
<div class="h-6 btn-disabled rounded col-span-2"></div>
<div class="h-6 btn-disabled rounded col-span-2"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</main>
</div>
<div class="drawer-side">
<label for="my-drawer" class="drawer-overlay"></label>
<aside class="z-20 w-64 bg-white">
<div class="text-gray-500 dark:text-gray-400">
<a class="flex justify-center text-lg font-bold text-gray-800 dark:text-gray-200" href="#">
<img class="" height="120px" width="120px" src="./images/Logo.png" />
</a>
<div class="divider"></div>
<ul class="mt-6">
<li class="relative px-6 py-3">
<span class="absolute inset-y-0 left-0 w-1 bg-[#25AC5B] rounded-tr-lg rounded-br-lg"
aria-hidden="true"></span>
<a class="inline-flex items-center w-full text-sm font-semibold text-black transition-colors duration-150 hover:text-gray-400 hover:bg-transparent"
href="completed-visits.html">
<svg class="w-5 h-5" aria-hidden="true" fill="none" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" viewBox="0 0 24 24" stroke="currentColor">
<path
d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122">
</path>
</svg>
<span class="ml-4">Visitas</span>
</a>
</li>
</ul>
<ul>
<li class="relative px-6 py-3">
<a class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800"
href="current-products.html">
<svg class="w-5 h-5" aria-hidden="true" fill="none" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" viewBox="0 0 24 24" stroke="currentColor">
<path d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z"></path>
<path d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path>
</svg>
<span class="ml-4">Productos</span>
</a>
</li>
</ul>
</div>
</aside>
</div>
</div>
<script src="./js/utils/network.js"></script>
<script src="./js/modules/NextVisitModule.js" type="module"></script>
<script>
function addOrder(item) {
if (item) {
localStorage.setItem("currentOrder", JSON.stringify(item));
location.href = '../../order.html'
}
}
function complete(id, checkId) {
let token = localStorage.token
fetch(`https://web-production-7924.up.railway.app/https://tzoalli-backend-production.up.railway.app/api/visit/updateStatus/${id}`,
{
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ status: "Realizado" })
})
.then((response) => response.json())
.then((response) => {
if (response.ok) {
Notiflix.Notify.info('Tu cambio se verá reflejado cuando se detecte una red');
}
setTimeout(() => {
window.location.replace("./completed-visits.html")
}, 2000);
})
.catch((err) => {
console.log(err)
})
}
</script>
<script src="./js/modules/LogoutModule.js" type="module"></script>
</body>
</html>