-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from ferviddigital/develop
Mobile UI updates and Vital Chart Summary
- Loading branch information
Showing
12 changed files
with
284 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script setup> | ||
import { ArrowSmallDownIcon, ArrowSmallUpIcon } from '@heroicons/vue/20/solid'; | ||
const props = defineProps({ | ||
vital: { | ||
/** @type {import('vue').PropType<import('../../typedefs').Vital>} */ | ||
type: Object, | ||
required: true, | ||
}, | ||
measurement: { | ||
/** @type {import('vue').PropType<import('../../typedefs').Measurement>} */ | ||
type: Object, | ||
required: true, | ||
}, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<span | ||
v-if="vital.high && measurement.value >= Number(vital.high)" | ||
class="border border-amber-200 p-1 py-0 pl-0 pr-1.5 rounded-lg text-amber-500 bg-amber-100 text-xs font-normal cursor-default whitespace-nowrap" | ||
><ArrowSmallUpIcon class="inline w-4 h-4 -mt-1" />High</span | ||
> | ||
<span | ||
v-else-if="vital.low && measurement.value <= Number(vital.low)" | ||
class="border border-amber-200 p-1 py-0 pl-0 pr-1.5 rounded-lg text-amber-500 bg-amber-100 text-xs font-normal cursor-default whitespace-nowrap" | ||
><ArrowSmallDownIcon class="inline w-4 h-4 -mt-0.5" />Low</span | ||
> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script setup> | ||
import { Dialog, DialogPanel, DialogTitle } from "@headlessui/vue"; | ||
import { computed, ref } from "vue"; | ||
import { useRoute } from "vue-router"; | ||
import { notes } from "../../store/notes"; | ||
const route = useRoute(); | ||
const note = computed(() => { | ||
const note = notes.value.find((note) => note.id === noteId.value); | ||
if (!note) | ||
throw Error(`Could not find Note with ID: ${route.params.noteId}.`); | ||
return note; | ||
}); | ||
const noteId = ref(String(route.params.noteId)); | ||
</script> | ||
|
||
<template> | ||
<Dialog :open="true" @close="$router.back()" class="relative z-50"> | ||
<div class="fixed inset-0 bg-black/30 backdrop-blur-sm" /> | ||
<div | ||
class="fixed flex w-screen h-screen top-0 items-start justify-center overflow-y-auto" | ||
> | ||
<DialogPanel | ||
class="bg-white w-full sm:max-w-xs rounded-2xl shadow-lg m-2 sm:mt-10" | ||
> | ||
<DialogTitle as="h3" class="text-lg font-semibold border-b p-6 py-3" | ||
>Note</DialogTitle | ||
> | ||
<p class="p-6 pb-0 py-3">{{ note.text }}</p> | ||
<div class="grid grid-flow-col justify-end items-center gap-5 mt-4 p-6"> | ||
<a | ||
@click="$router.push({ name: 'VitalMeasurementNoteUpdate', params: { noteId: note.id } })" | ||
class="text-sm text-gray-500 font-light cursor-pointer" | ||
>Edit</a | ||
> | ||
<button class="btn" @click="$router.back()">Done</button> | ||
</div> | ||
</DialogPanel> | ||
</div> | ||
</Dialog> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.