diff --git a/src/pages/site/CantidadBusesLinea.svelte b/src/pages/site/CantidadBusesLinea.svelte new file mode 100644 index 0000000..64ce3f1 --- /dev/null +++ b/src/pages/site/CantidadBusesLinea.svelte @@ -0,0 +1,97 @@ + + +
+
+
Buses en recorrido por línea
+
+
+
+
+
+ +
+
+ +
+ + + {#each data as row} + + + + + {/each} + +
{row.route_short_name}{row.count}
+
+
+
+
diff --git a/src/pages/site/CantidadBusesRecorrido.svelte b/src/pages/site/CantidadBusesRecorrido.svelte new file mode 100644 index 0000000..2f31a05 --- /dev/null +++ b/src/pages/site/CantidadBusesRecorrido.svelte @@ -0,0 +1,32 @@ + + +
+
+
+
+
Buses en recorrido
+
+ +
+
+ +
+
+
+

{count}

+
+
\ No newline at end of file diff --git a/src/pages/site/CantidadLineas.svelte b/src/pages/site/CantidadLineas.svelte new file mode 100644 index 0000000..909dacc --- /dev/null +++ b/src/pages/site/CantidadLineas.svelte @@ -0,0 +1,32 @@ + + +
+
+
+
+
Cantidad de Líneas
+
+ +
+
+ +
+
+
+

{count}

+
+
\ No newline at end of file diff --git a/src/pages/site/CantidadParaderos.svelte b/src/pages/site/CantidadParaderos.svelte new file mode 100644 index 0000000..01f8357 --- /dev/null +++ b/src/pages/site/CantidadParaderos.svelte @@ -0,0 +1,31 @@ + + +
+
+
+
+
Cantidad de Paraderos
+
+ +
+
+ +
+
+
+

{count}

+
+
\ No newline at end of file diff --git a/src/pages/site/CantidadParaderosComuna.svelte b/src/pages/site/CantidadParaderosComuna.svelte new file mode 100644 index 0000000..efa5a74 --- /dev/null +++ b/src/pages/site/CantidadParaderosComuna.svelte @@ -0,0 +1,32 @@ +
+
+
+
+
Paraderos por comuna
+
+ +
+
+ +
+
+
+

2.382

+ + + + + + + + + + + + + + + +
Chrome4306
Firefox3801
IE1689
+
+
\ No newline at end of file diff --git a/src/pages/site/Home.svelte b/src/pages/site/Home.svelte index 5a72106..bacdfc9 100644 --- a/src/pages/site/Home.svelte +++ b/src/pages/site/Home.svelte @@ -1,16 +1,44 @@ -Inicio + +Análisis de datos
-
-
-
-
Empty card
+
+
+
+ loading1 = ev.detail} />
-
+
+ loading2 = ev.detail} /> +
+
+ +
+
+ loading3 = ev.detail} /> +
+
+ loading4 = ev.detail} />
-
\ No newline at end of file + +
+ loading5 = ev.detail} /> +
+
diff --git a/src/services/lineas.js b/src/services/lineas.js index 6b35a73..63aac0d 100644 --- a/src/services/lineas.js +++ b/src/services/lineas.js @@ -62,3 +62,33 @@ export async function getBusesLinea(id_linea) { if (!res.ok) throw await res.text() return res.json() } + + +export async function getCount(params) { + const query = !params ? '' : '?' + (new URLSearchParams(params).toString()); + const res = await fetch(`${base}/lineas/count/${query}`, { + headers: { "Authorization": `Bearer ${getToken()}`, "Content-Type": "application/json" } + }) + if (!res.ok) throw await res.text() + return res.json() +} + + +export async function getCountBuses(params) { + const query = !params ? '' : '?' + (new URLSearchParams(params).toString()); + const res = await fetch(`${base}/lineas/count_buses/${query}`, { + headers: { "Authorization": `Bearer ${getToken()}`, "Content-Type": "application/json" } + }) + if (!res.ok) throw await res.text() + return res.json() +} + + +export async function getCountBusesRecorridos(params) { + const query = !params ? '' : '?' + (new URLSearchParams(params).toString()); + const res = await fetch(`${base}/lineas/count_buses_recorridos/${query}`, { + headers: { "Authorization": `Bearer ${getToken()}`, "Content-Type": "application/json" } + }) + if (!res.ok) throw await res.text() + return res.json() +} \ No newline at end of file diff --git a/src/services/paraderos.js b/src/services/paraderos.js index ae7c5b0..4aac73b 100644 --- a/src/services/paraderos.js +++ b/src/services/paraderos.js @@ -121,3 +121,15 @@ export async function getInfoPublic(id_paradero) { if (!res.ok) throw await res.text() return res.json() } + + + + +export async function getCount(params) { + const query = !params ? '' : '?' + (new URLSearchParams(params).toString()); + const res = await fetch(`${base}/paraderos/count/${query}`, { + headers: { "Authorization": `Bearer ${getToken()}`, "Content-Type": "application/json" } + }) + if (!res.ok) throw await res.text() + return res.json() +} \ No newline at end of file