Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds new observed field #45

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading