Skip to content

Commit

Permalink
Adds new observed field (#45)
Browse files Browse the repository at this point in the history
* bumping timeout to 1min

* converting boolean observed column to checkbox

* adding toggle for observed targets
  • Loading branch information
havok2063 authored Aug 2, 2024
1 parent e4a6d8c commit 91c7bdb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import JSONbig from 'json-big'
// Defines the API instance in Axios with special handling for big integers.
const axiosInstance = axios.create({
baseURL: import.meta.env.VITE_API_URL,
timeout: 5000,
timeout: 60000,
transformResponse: [
function transform(data) {
// Replacing the default transformResponse in axios because this uses JSON.parse and causes problems
Expand Down
6 changes: 6 additions & 0 deletions src/views/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
</v-icon>
</template>

<!-- add checkmark for has_been_observed boolean -->
<template v-slot:item.has_been_observed="{ item }">
<v-icon>
{{ item.has_been_observed ? "mdi-checkbox-marked" : null }}
</v-icon>
</template>
</v-data-table>
</v-col>
</v-row>
Expand Down
16 changes: 15 additions & 1 deletion src/views/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@
</v-col>
</v-row>

<v-row>
<v-col cols="12">
<v-switch
v-tippy="{content:'Toggle between only observed targets or all targets', placement: 'left', maxWidth:200}"
v-model="formData.observed"
color="success"
:label="`Targets: ${formData.observed ? 'Observed' : 'All'}`"
hide-details
inset
></v-switch>
</v-col>
</v-row>

<v-row>
<v-col cols="4">
<v-btn rounded="lg" color='primary' @click="submit_form" size="large" :disabled="!valid" :append-icon="valid ? 'mdi-check-circle' : 'mdi-close-circle'">Search
Expand Down Expand Up @@ -137,7 +150,8 @@ let initFormData = {
units: 'degree',
release: store.release,
carton: '',
program: ''
program: '',
observed: true
}
// create dynamic bindings to form fields
let formData = ref({ ...initFormData })
Expand Down

0 comments on commit 91c7bdb

Please sign in to comment.