|
11 | 11 | import type { Vuelo } from '$lib';
|
12 | 12 | import {
|
13 | 13 | AlertCircleIcon,
|
14 |
| - AlertOctagonIcon, |
15 | 14 | ArrowDownIcon,
|
16 | 15 | ArrowLeftIcon,
|
17 | 16 | ArrowRightIcon,
|
18 |
| - ClockIcon, |
19 |
| - PlaneIcon, |
20 | 17 | PlaneTakeoffIcon
|
21 | 18 | } from 'lucide-svelte';
|
22 |
| - import NuloScienceSvg from '$lib/assets/Nulo_Science_Inc.svg'; |
23 |
| - import Icon from '@iconify/svelte'; |
| 19 | + import Icon from '$lib/components/icon.svelte'; |
24 | 20 | import AverageVis from './average-vis.svelte';
|
25 | 21 | import { getDelayColor, COLOR_CLASSES } from '$lib/colors';
|
26 | 22 | import { AEROPUERTOS_FLYBONDI } from '@/aeropuertos-flybondi';
|
|
89 | 85 | if (b.json.estes === 'Cancelado') return 1;
|
90 | 86 | return b.delta - a.delta;
|
91 | 87 | });
|
92 |
| - $: console.log(vuelos, todosLosVuelos); |
93 | 88 | $: aerolineasVuelosAterrizados = todosLosVuelos.filter(
|
94 | 89 | (vuelo) =>
|
95 | 90 | vuelo.json.idaerolinea === 'AR' &&
|
|
260 | 255 | .format('YYYY-MM-DD')}{aerolineaSeleccionada !== 'FO'
|
261 | 256 | ? '&aerolinea=' + aerolineaSeleccionada
|
262 | 257 | : ''}"
|
| 258 | + aria-label="Ir al día anterior" |
263 | 259 | >
|
264 | 260 | <ArrowLeftIcon class="h-4 w-4" />
|
265 | 261 | </Button>
|
266 | 262 | {:else}
|
267 | 263 | <div></div>
|
268 | 264 | {/if}
|
269 | 265 | <div class="flex items-center gap-4">
|
270 |
| - <h3 |
| 266 | + <span |
271 | 267 | class="flex w-full flex-col items-center justify-center text-neutral-700 dark:text-neutral-300"
|
272 | 268 | >
|
273 | 269 | <span class="text-xs leading-tight">viendo datos de</span>
|
274 | 270 | <span class=" font-bold leading-tight"
|
275 | 271 | >{longDateFormatter.format(dayjs(date).toDate()).replace(',', '')}</span
|
276 | 272 | >
|
277 |
| - </h3> |
| 273 | + </span> |
278 | 274 | <Select.Root
|
279 | 275 | selected={{ value: aerolineaSeleccionada, label: AEROLINEAS[aerolineaSeleccionada] }}
|
280 | 276 | onSelectedChange={(e) => (aerolineaSeleccionada = e?.value as keyof typeof AEROLINEAS)}
|
|
300 | 296 | .tz('America/Argentina/Buenos_Aires')
|
301 | 297 | .add(1, 'day')
|
302 | 298 | .format('YYYY-MM-DD')}"
|
| 299 | + aria-label="Ir al día siguiente" |
303 | 300 | >
|
304 | 301 | <ArrowRightIcon class="h-4 w-4" />
|
305 | 302 | </Button>
|
|
320 | 317 | {#if vuelo.atda}
|
321 | 318 | <Icon
|
322 | 319 | class="h-8 w-8 {getDelayColor(vuelo.delta)}"
|
323 |
| - icon="fa-solid:plane" |
| 320 | + icon="fa6-solid-plane" |
324 | 321 | aria-label="Vuelo {vuelo.json.nro} con {vuelo.delta / 60} minutos de retraso"
|
325 | 322 | />
|
326 | 323 | {:else if vuelo.json.estes === 'Cancelado'}
|
327 | 324 | <Icon
|
328 | 325 | class="h-8 w-8 text-neutral-700 dark:text-neutral-300"
|
329 |
| - icon="fa-solid:plane-slash" |
| 326 | + icon="fa6-solid-plane-slash" |
330 | 327 | aria-label="Vuelo {vuelo.json.nro} cancelado"
|
331 | 328 | />
|
332 | 329 | {/if}
|
|
347 | 344 | <div class="flex items-center gap-1">
|
348 | 345 | <Icon
|
349 | 346 | class="size-4 text-neutral-700 dark:text-neutral-300"
|
350 |
| - icon="fa-solid:plane-slash" |
| 347 | + icon="fa6-solid-plane-slash" |
351 | 348 | />
|
352 | 349 | <span>Cancelado</span>
|
353 | 350 | </div>
|
354 | 351 | <div class="flex items-center gap-1">
|
355 |
| - <Icon class="size-4 text-[#b10000]" icon="fa-solid:plane" /> |
| 352 | + <Icon class="size-4 text-[#b10000]" icon="fa6-solid-plane" /> |
356 | 353 | <span>mas de 45min</span>
|
357 | 354 | </div>
|
358 | 355 | <div class="flex items-center gap-1">
|
359 |
| - <Icon class="size-4 {COLOR_CLASSES[45 * 60]}" icon="fa-solid:plane" /> |
| 356 | + <Icon class="size-4 {COLOR_CLASSES[45 * 60]}" icon="fa6-solid-plane" /> |
360 | 357 | <span>45-30min</span>
|
361 | 358 | </div>
|
362 | 359 | <div class="flex items-center gap-1">
|
363 |
| - <Icon class="size-4 {COLOR_CLASSES[30 * 60]}" icon="fa-solid:plane" /> |
| 360 | + <Icon class="size-4 {COLOR_CLASSES[30 * 60]}" icon="fa6-solid-plane" /> |
364 | 361 | <span>30-15min</span>
|
365 | 362 | </div>
|
366 | 363 | <div class="flex items-center gap-1">
|
367 |
| - <Icon class="size-4 {COLOR_CLASSES[15 * 60]}" icon="fa-solid:plane" /> |
| 364 | + <Icon class="size-4 {COLOR_CLASSES[15 * 60]}" icon="fa6-solid-plane" /> |
368 | 365 | <span>15-0min</span>
|
369 | 366 | </div>
|
370 | 367 | </div>
|
|
379 | 376 | <AlertDialog.Root>
|
380 | 377 | <AlertDialog.Trigger>
|
381 | 378 | <Button size="icon" variant="outline" class="size-7" aria-label="Ver metodología">
|
382 |
| - <Icon icon="grommet-icons:info" class="size-4" /> |
| 379 | + <Icon icon="grommet-icons-info" class="size-4" /> |
383 | 380 | </Button>
|
384 | 381 | </AlertDialog.Trigger>
|
385 | 382 | <AlertDialog.Content>
|
|
449 | 446 | class="absolute right-4 top-4 size-7"
|
450 | 447 | aria-label="Ver metodología"
|
451 | 448 | >
|
452 |
| - <Icon icon="grommet-icons:info" class="size-4" /> |
| 449 | + <Icon icon="grommet-icons-info" class="size-4" /> |
453 | 450 | </Button>
|
454 | 451 | </AlertDialog.Trigger>
|
455 | 452 | <AlertDialog.Content>
|
|
572 | 569 | <hr class="flex-1 border-neutral-200 dark:border-neutral-700" />
|
573 | 570 | </div>
|
574 | 571 | {#each vuelos as vuelo}
|
575 |
| - <div |
576 |
| - class="rounded-lg bg-neutral-100 px-2 py-1 dark:bg-neutral-800" |
577 |
| - data-id={vuelo.aerolineas_flight_id} |
578 |
| - > |
| 572 | + <div class="rounded-lg bg-neutral-100 px-2 py-1 dark:bg-neutral-800"> |
579 | 573 | <div class="flex flex-col justify-between">
|
580 | 574 | <span class="text-sm text-neutral-900 dark:text-neutral-100">
|
581 | 575 | <a
|
|
600 | 594 | class={`font-bold ${vuelo.json.estes === 'Cancelado' ? 'font-black text-black dark:text-neutral-100' : getDelayColor(vuelo.delta, true)} flex items-center text-sm leading-none`}
|
601 | 595 | >
|
602 | 596 | {#if vuelo.atda}
|
603 |
| - <PlaneTakeoffIcon class="mr-1 h-4 w-4" /> |
| 597 | + <Icon icon="lucide-plane-takeoff" class="mr-1 size-4" /> |
604 | 598 | {delayString(vuelo)}
|
605 | 599 | {:else if vuelo.json.estes === 'Cancelado'}{/if}
|
606 | 600 | </span>
|
|
0 commit comments