Skip to content

Commit

Permalink
Added description column to cases table and query
Browse files Browse the repository at this point in the history
  • Loading branch information
asriniv4 committed Jan 23, 2023
1 parent bf94d04 commit 0aa6e82
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion netlify/functions/get-cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const supabase = createClient(CSATS_DATABASE_URL, CSATS_DATABASE_SECRET_API_KEY)
exports.handler = async function (event, context) {
let { data, error } = await supabase
.from('cases')
.select('id, primary_surgeon, secondary_surgeon, thumbnail_location, video_url, patient_name, patient_dob, surgery_date')
.select('id, primary_surgeon, secondary_surgeon, thumbnail_location, description, video_url, patient_name, patient_dob, surgery_date')

console.log(data, error);

Expand Down
11 changes: 10 additions & 1 deletion src/components/CaseCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ onMounted(() => {
<div class="card shadow-sm">
<!-- <svg class="bd-placeholder-img card-img-top" width="100%" height="225" xmlns="https://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Thumbnail" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#55595c"></rect><text x="50%" y="50%" fill="#eceeef" dy=".3em">Thumbnail</text></svg> -->
<div class="card-body">
<img :src="thumbnailUrl" />
<div v-if="loading" class="d-flex justify-content-center">
<div class="spinner-border text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<img v-else :src="thumbnailUrl" />
<div><strong>Primary:&nbsp;</strong>{{ myCase.primary_surgeon }}</div>
<div><strong>Secondary:&nbsp;</strong>{{ myCase.secondary_surgeon }}</div>
</div>
Expand All @@ -47,4 +52,8 @@ img {
width: 375px;
height: 250px;
}
div.d-flex {
width: 375px;
height: 250px;
}
</style>

0 comments on commit 0aa6e82

Please sign in to comment.