Added timezones
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import MainLayout from "@/Layouts/MainLayout.vue";
|
||||
import GlassBox from "@/Components/FlightsGoneBy/GlassBox.vue";
|
||||
import { Head } from "@inertiajs/vue3";
|
||||
import { ref } from "vue";
|
||||
import { ref, computed} from "vue";
|
||||
import {VFileInput} from "vuetify/components";
|
||||
import {getCsrfToken} from "@/utils/helpers";
|
||||
|
||||
@@ -15,6 +15,13 @@ const errors = ref<string[]>([]);
|
||||
const fileInput = ref<InstanceType<typeof VFileInput> | null>(null);
|
||||
const selectedFile = ref<File | null>(null);
|
||||
|
||||
const blurb = computed(() => {
|
||||
if (status.value === 'success') {
|
||||
return `Successfully imported ${importedCount} flight${importedCount.value !== 1 ? 's' : ''}. You will just need to reconcile some mismatched airlines and airports.`;
|
||||
}
|
||||
return 'Import a CSV export from MyFlightRadar24. You will then be guided to reconcile any data mismatches.';
|
||||
});
|
||||
|
||||
async function onFileChange(e: Event) {
|
||||
const input = e.target as HTMLInputElement;
|
||||
const file = input.files?.[0];
|
||||
@@ -57,8 +64,7 @@ async function onFileChange(e: Event) {
|
||||
|
||||
<template>
|
||||
<Head title="Import" />
|
||||
<GlassBox style="display: flex;flex-direction: column;align-items: center;justify-content: center;">
|
||||
<h2>Import Your Flights</h2>
|
||||
<GlassBox title="Import Your Flights">
|
||||
<p v-if="status !== 'success'">
|
||||
Import a CSV export from MyFlightRadar24. You will then be guided
|
||||
to reconcile any data mismatches.
|
||||
@@ -66,7 +72,6 @@ async function onFileChange(e: Event) {
|
||||
<p v-else-if="status === 'success'" type="success" >
|
||||
Successfully imported {{ importedCount }} flight{{ importedCount !== 1 ? 's' : '' }}. You will just need to reconcile some mismatched airlines and airports.
|
||||
</p>
|
||||
<div style="flex:0;width: 100%;display:flex;flex-direction:column;align-items: center;justify-content: center;gap:2em;">
|
||||
<v-file-input
|
||||
style="flex:0;width:100%"
|
||||
prepend-icon=""
|
||||
@@ -83,14 +88,11 @@ async function onFileChange(e: Event) {
|
||||
<span>Importing your flights…</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<v-alert closable v-if="status === 'error'" type="error">
|
||||
<div v-for="(err, i) in errors" :key="i">{{ err }}</div>
|
||||
</v-alert>
|
||||
|
||||
<v-btn :href="route('reconcile')" v-if="status === 'success'" variant="tonal" size="x-large" block >Reconcile Your Data</v-btn>
|
||||
</div>
|
||||
<v-btn :href="route('reconcile')" v-if="status === 'success'" size="x-large" block >Reconcile Your Data</v-btn>
|
||||
</GlassBox>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user