Skip to content

Commit

Permalink
feat: livelox results links
Browse files Browse the repository at this point in the history
  • Loading branch information
brownben committed Jan 5, 2025
1 parent 35e93f1 commit f2599c0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions frontend/components/ResultsLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const filteredLinks = computed(() =>
const getIcon = (type: string) => {
if (type === 'Standard Results') return DocumentTextIcon
else if (type === 'Routegadget') return MapIcon
else if (type === 'Livelox') return MapIcon
else if (type === 'Winsplits') return ChartBarIcon
else if (type === 'GPS Tracking') return MapPinIcon
else return LinkIcon
Expand Down
7 changes: 7 additions & 0 deletions frontend/pages/events/[id]/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ useTitle({
class="col-span-2"
:validator="IsValidURL"
/>
<Input
v-model="form.results_links['Livelox']"
label="Livelox:"
type="url"
class="col-span-2"
:validator="IsValidURL"
/>
<Input
v-model="form.results_links['GPS Tracking']"
label="GPS Tracking:"
Expand Down
19 changes: 10 additions & 9 deletions frontend/pages/upload/file.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const form = reactive({
Routegadget: '',
Winsplits: '',
'GPS Tracking': '',
},
Livelox: '',
} as Record<string, string>,
overwrite: false,
})
Expand All @@ -28,14 +29,7 @@ const getEvent = async () => {
event.value = await useGet(`events/${form.event_id}`)
const links = event.value?.results_links
if (links) {
if (links.Winsplits) form.results_links.Winsplits = links.Winsplits
if (links.Routegadget) form.results_links.Routegadget = links.Routegadget
if (links['Standard Results'])
form.results_links['Standard Results'] = links['Standard Results']
if (links['GPS Tracking'])
form.results_links['GPS Tracking'] = links['GPS Tracking']
}
if (links) form.results_links = links
} catch {
event.value = null
}
Expand Down Expand Up @@ -148,6 +142,13 @@ useTitle({
class="col-span-2"
:validator="IsValidURL"
/>
<Input
v-model="form.results_links['Livelox']"
label="Livelox:"
type="url"
class="col-span-2"
:validator="IsValidURL"
/>
<Input
v-model="form.results_links['GPS Tracking']"
label="GPS Tracking:"
Expand Down

0 comments on commit f2599c0

Please sign in to comment.