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

feat: Update directory app with services #4501

Merged
merged 46 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1c9e614
feat: update initial page query
connoratrug Nov 18, 2024
2304d87
cleanup: pull out header
connoratrug Nov 18, 2024
4453280
Merge branch 'master' of github.com:molgenis/molgenis-emx2 into feat/…
connoratrug Nov 20, 2024
4002252
add generated types for directory schema
connoratrug Nov 20, 2024
5d49a2a
format generated types
connoratrug Nov 20, 2024
aad739e
format again
connoratrug Nov 20, 2024
8b3f38a
refactor BiobankCard to use script setup
connoratrug Nov 21, 2024
b2e3f0d
use tabs for section and pullout section
connoratrug Nov 21, 2024
6a53fa4
add service details to card
connoratrug Nov 21, 2024
9627eda
style: switch to bootstrap tab component for styling
connoratrug Nov 21, 2024
d9c7648
fix: fix tab shadow
connoratrug Nov 21, 2024
9243eba
setup for add services to checkout store
connoratrug Nov 22, 2024
cf20330
handle add/remove service to store
connoratrug Nov 22, 2024
10d7d2b
add service details page
connoratrug Nov 22, 2024
ec0603a
remove junk
connoratrug Nov 22, 2024
e0b7464
chore: fix compiler warnings
connoratrug Nov 22, 2024
efccca8
update checkout count with service count
connoratrug Nov 22, 2024
af605bb
refactor NegotiatorSelector to use types and prepare for services
connoratrug Nov 25, 2024
74339ce
refactor checkout store
connoratrug Nov 25, 2024
ddc6377
show selected services in cart
connoratrug Nov 25, 2024
c21a5c0
add service count to search results section
connoratrug Nov 25, 2024
c9f4662
cleanup collection count
connoratrug Nov 25, 2024
8daa196
show when card is in selection ( either via a collecton or service)
connoratrug Nov 25, 2024
8ed8a45
fix quality label
connoratrug Nov 25, 2024
32abf8f
refactor remove all to include serves
connoratrug Nov 25, 2024
d55e7ee
more reactive tabs
connoratrug Nov 25, 2024
6dd9249
always show non empty cart tab
connoratrug Nov 25, 2024
ad1d7ab
fix removeAll function call on success
connoratrug Nov 27, 2024
90826e0
add service selection to the bookmark
connoratrug Nov 27, 2024
9a19d67
add contact info to service report
connoratrug Nov 27, 2024
e08c06e
chore: add ref from service back to biobank
connoratrug Nov 27, 2024
8456571
Merge branch 'master' of github.com:molgenis/molgenis-emx2 into feat/…
connoratrug Nov 28, 2024
89f261d
feat: link back to biobank from service
connoratrug Nov 28, 2024
a4b4157
add quality to service report
connoratrug Nov 28, 2024
d70dd76
set default app bg
connoratrug Nov 28, 2024
8df01ad
refactor component tree to keep consisten styling
connoratrug Nov 28, 2024
4ea4e83
sync card styles
connoratrug Nov 28, 2024
a298137
change default service filter to a type filter
connoratrug Nov 29, 2024
b381c23
chore: pull out checkbox
connoratrug Nov 29, 2024
8bee98e
feat: select all services in biobank card
connoratrug Nov 29, 2024
396b5e6
fix select all style
connoratrug Dec 2, 2024
d9952c5
chore: initialy use serviceType.label field as label
connoratrug Dec 2, 2024
4e49b85
fix: menu breadcrumb dropdown icon theme css
connoratrug Dec 2, 2024
7e25ca0
Merge branch 'master' of github.com:molgenis/molgenis-emx2 into feat/…
connoratrug Dec 4, 2024
d678c7e
chore flip template and script tags
connoratrug Dec 4, 2024
1208f50
chore: cleanup
connoratrug Dec 4, 2024
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
1 change: 0 additions & 1 deletion apps/directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.0.1",
"description": "BBMRI Directory app, for browsing collections and biobanks in EMX2",
"main": "index.js",
"author": "Jelmer Veen <https://github.com/jelmerveen>",
"license": "LGPL3",
"private": true,
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions apps/directory/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Molgenis v-model="session">
<Molgenis v-model="session" style="background-color: white">
<template v-if="banner" #banner>
<div v-html="banner"></div>
</template>
Expand Down Expand Up @@ -44,7 +44,11 @@ watch(
newQuery &&
Object.keys(newQuery).length === 0
) {
createBookmark(filtersStore.filters, checkoutStore.selectedCollections);
createBookmark(
filtersStore.filters,
checkoutStore.selectedCollections,
checkoutStore.selectedServices
);
applyBookmark(newQuery);
}

Expand Down
55 changes: 55 additions & 0 deletions apps/directory/src/components/Card.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<template>
<article>
<section class="d-flex flex-column align-items-center">
<div class="d-flex flex-column h-100 align-self-stretch">
<header class="border-0 biobank-card-header p-1">
<slot name="header"></slot>
</header>

<Tabs :tabs="tabs" @update:active-tab="updateTab" />

<slot></slot>
</div>
</section>
</article>
</template>

<script setup lang="ts">
import Tabs from "./Tabs.vue";

defineProps<{
tabs: Record<
string,
{ id: string; label: string; active: boolean; disabled: boolean }
>;
}>();

const emit = defineEmits(["update:activeTab"]);

function updateTab(tab: string) {
emit("update:activeTab", tab);
}
</script>

<style>
article {
padding: 0;
position: relative;
height: 28rem;
}

article {
box-shadow: 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132),
0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108);
}

article section {
height: 100%;
width: 100%;
}

/* TODO put in theme */
.biobank-card-header {
background-color: #efefef;
}
</style>
19 changes: 19 additions & 0 deletions apps/directory/src/components/CardItem.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<div class="card-item mx-1">
<div class="ml-1 pt-2 d-flex">
<slot name="title"></slot>
</div>

<slot></slot>
</div>
</template>

<style>
.card-item {
word-break: break-word;
}

.card-item th {
width: 25%;
}
</style>
24 changes: 24 additions & 0 deletions apps/directory/src/components/CheckBox.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<input
type="checkbox"
:id="id"
@change="emit('change', ($event.target as HTMLInputElement).checked)"
:checked="isChecked"
hidden
/>
<label class="btn" :for="id">
<span v-show="!isChecked"><i class="fa-regular fa-lg fa-square"></i></span>
<span v-show="isChecked"
><i class="fa-regular fa-lg fa-check-square"></i
></span>
</label>
</template>

<script setup lang="ts">
defineProps<{
id: string;
isChecked?: boolean;
}>();

const emit = defineEmits(["change"]);
</script>
26 changes: 26 additions & 0 deletions apps/directory/src/components/Tabs.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<template>
<ul class="nav nav-tabs mb-2 mt-2 pl-2">
<li v-for="tab in Object.keys(tabs)" class="nav-item">
<button
type="button"
class="btn btn-link nav-link shadow-none"
:disabled="tabs[tab].disabled"
:class="{ active: tabs[tab].active }"
@click="() => $emit('update:activeTab', tab)"
>
{{ tabs[tab].label ?? tabs[tab].id }}
</button>
</li>
</ul>
</template>

<script setup lang="ts">
defineProps<{
tabs: Record<
string,
{ id: string; label: string; active: boolean; disabled: boolean }
>;
}>();

defineEmits(["update:activeTab"]);
</script>
Loading