-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorder.html
More file actions
220 lines (205 loc) · 11.6 KB
/
order.html
File metadata and controls
220 lines (205 loc) · 11.6 KB
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
<!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://cdn.jsdelivr.net/npm/daisyui@2.42.1/dist/full.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2/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>Orden | Nueva orden</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">
<!-- Contenedor | Coloca tu contenido aquí -->
<div class="pt-5">
<div class="mb-6 flex justify-center items-center w-full">
<svg class="mr-4 drop-shadow-sm" style="width:32px;height:32px;color: #25AC5B"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path fill-rule="evenodd"
d="M7.5 6v.75H5.513c-.96 0-1.764.724-1.865 1.679l-1.263 12A1.875 1.875 0 004.25 22.5h15.5a1.875 1.875 0 001.865-2.071l-1.263-12a1.875 1.875 0 00-1.865-1.679H16.5V6a4.5 4.5 0 10-9 0zM12 3a3 3 0 00-3 3v.75h6V6a3 3 0 00-3-3zm-3 8.25a3 3 0 106 0v-.75a.75.75 0 011.5 0v.75a4.5 4.5 0 11-9 0v-.75a.75.75 0 011.5 0v.75z"
clip-rule="evenodd" />
</svg>
<h1 class="font-bold text-2xl drop-shadow-sm" style="color: #25AC5B">Productos de la orden</h1>
</div>
<div class="card shadow-xl bg-white w-full bg-neutral text-neutral-content lg:w-1/1">
<div class="place-items-center p-5">
<div>
<p id="title" class="text-black text-lg font-medium text-center"></p>
</div>
<div class="grid lg:flex justify-center">
<a id="addProducts" class="btn bg-[#25AC5B] border-none mt-2 w-auto mx-2" href="./products.html"
style="background-color: #25ac5b; color: white">
<svg class="stroke-1 h-6 w-6 mr-2" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round"
d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
Agregar productos
</a>
<a id="btnClearOrder" class="btn bg-[#EA7063] border-none mt-2 w-auto mx-2"
style="background-color:#EB7063; color: white">
<svg class="stroke-1 h-6 w-6 mr-2" 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="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" />
</svg>
Vaciar orden
</a>
</div>
</div>
</div>
</div>
<div class="overflow-x-auto w-full pt-5">
<table class="table w-full">
<!-- head -->
<thead>
<tr>
<th class="bg-white">Nombre del dulce</th>
<th class="bg-white">Cantidad</th>
<th class="bg-white">Precio unitario</th>
<th class="bg-white">Subtotal</th>
<th class="bg-white">Quitar</th>
</tr>
</thead>
<tbody id="bodyTable">
</tbody>
</table>
</div>
<div class="flex justify-center py-5 sticky bottom-0 z-50">
<div class="card shadow-md bg-white w-full md:w-1/2 lg:w-1/2 bg-neutral text-neutral-content">
<div class="mx-10">
<p id="total_order_amount" class="text-black text-center text-lg font-medium py-2">Monto total: </p>
<input id="received_by" type="text" placeholder="Nombre de quien recibe"
class="input input-bordered w-full text-black" />
</div>
<div class="flex justify-around p-5">
<div>
<label class="btn bg-[#25AC5B] border-none" for="my-modal-confirm"
style="background-color: #25ac5b; color: white">
<svg class="stroke-1 h-6 w-6 mr-2" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75" />
</svg>
Crear orden
</label>
</div>
<div>
<a class="btn bg-[#EA7063] border-none" id="btnCancelOrder"
style="background-color:#EB7063; color: white">
<svg class="stroke-1 h-6 w-6 mr-2" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
Cancelar
</a>
</div>
</div>
</div>
</div>
<!-- Modal de confirmación -->
<input type="checkbox" id="my-modal-confirm" class="modal-toggle" />
<div class="modal modal-bottom sm:modal-middle">
<div class="modal-box">
<label for="my-modal-confirm" class="btn btn-sm btn-circle absolute right-2 top-2">✕</label>
<h3 class="text-lg font-bold pt-5">¿Crear una nueva orden?</h3>
<p class="py-4">Una vez creada la orden, debes completarla</p>
<a id="btnConfirmOrder" class="btn bg-[#25AC5B] border-none w-full mt-2" style="background-color: #25ac5b; color: white">
<svg class="stroke-1 h-6 w-6 mr-2" 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>
Sí, crear
</a>
</div>
</div>
</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/OrderModule.js" type="module"></script>
<script src="./js/modules/LogoutModule.js" type="module"></script>
<script>
function deleteProductStorage(i) {
let products = JSON.parse(localStorage.getItem("orderProducts"))
products.splice(i, 1);
localStorage.setItem("orderProducts", JSON.stringify(products))
location.href = "./order.html"
}
</script>
</body>
</html>