-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: multiselect for search hpo-term and category + list view for pa…
…tient matches
- Loading branch information
Showing
12 changed files
with
295 additions
and
192 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,3 +123,7 @@ a:focus{ | |
padding: .5rem; | ||
} | ||
|
||
|
||
.b-form-tag { | ||
margin-bottom: 0.25rem; | ||
} |
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,36 @@ | ||
.list { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.list .list-items { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.list-header, | ||
.list-search { | ||
margin-bottom: 0.5rem; | ||
} | ||
|
||
.list .list-item { | ||
padding: 0.25rem 0.25rem; | ||
margin-bottom: 0.5rem; | ||
vertical-align: middle; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.list .list-card { | ||
background-color: #ececec; | ||
border: 1px solid #dedede; | ||
|
||
box-shadow: 0 4px 25px 0 rgba(0,0,0,.1); | ||
transition: all .3s ease-in-out; | ||
|
||
border-radius: 4px; | ||
|
||
padding: 0.5rem 1rem; | ||
width: 100%; | ||
} |
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
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,83 @@ | ||
<script lang="ts"> | ||
import type { ColorVariant } from 'bootstrap-vue-next'; | ||
import { BFormTag } from 'bootstrap-vue-next'; | ||
import type { PropType } from 'vue'; | ||
import { defineComponent, ref } from 'vue'; | ||
type Tag = { | ||
id: string | number, | ||
value: string | ||
}; | ||
export default defineComponent({ | ||
components: { | ||
BFormTag, | ||
}, | ||
props: { | ||
modelValue: { | ||
type: Array as PropType<Tag[]>, | ||
required: true, | ||
}, | ||
tagClass: { | ||
type: String as PropType<any>, | ||
}, | ||
tagPills: { | ||
type: Boolean, | ||
}, | ||
tagValidator: { | ||
type: Function as PropType<(t: string) => boolean>, | ||
}, | ||
tagVariant: { | ||
type: String as PropType<ColorVariant>, | ||
}, | ||
}, | ||
emits: ['update:modelValue'], | ||
setup(props, { emit }) { | ||
const items = ref<Tag[]>([]); | ||
items.value = props.modelValue; | ||
const drop = (value: string) => { | ||
const index = items.value.findIndex((el) => el.value === value); | ||
if (index !== -1) { | ||
items.value.splice(index, 1); | ||
} | ||
emit('update:modelValue', items); | ||
}; | ||
return { | ||
items, | ||
drop, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
<template> | ||
<slot> | ||
<ul class="list-unstyled mb-0 d-flex flex-wrap align-items-center"> | ||
<template | ||
v-for="(item, index) in items" | ||
:key="index" | ||
> | ||
<slot | ||
name="tag" | ||
:tag="item.id" | ||
:tag-class="tagClass" | ||
:tag-variant="tagVariant" | ||
:tag-pills="tagPills" | ||
:remove-tag="drop" | ||
> | ||
<BFormTag | ||
:key="item.id" | ||
:class="tagClass" | ||
tag="li" | ||
:variant="tagVariant" | ||
:pill="tagPills" | ||
@remove="drop" | ||
> | ||
{{ item.value }} | ||
</BFormTag> | ||
</slot> | ||
</template> | ||
</ul> | ||
</slot> | ||
</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
Oops, something went wrong.