Skip to content
Closed
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
3 changes: 2 additions & 1 deletion src/components/sidebar/DatasetSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const dynamicUpperMenuOptions: MenuOption[] = [
{
children: [
{
disabled: false,
icon: renderIcon("material-symbols:description-outline"),
key: "dataset:metadata:general-information",
label: "General information",
Expand Down Expand Up @@ -64,7 +65,7 @@ const dynamicUpperMenuOptions: MenuOption[] = [
{
icon: renderIcon("fluent-mdl2:relationship"),
key: "dataset:metadata:related-identifiers",
label: "Related Identifiers",
label: "Related identifiers",
},
{
// language, managing organization, size goes in here
Expand Down
6 changes: 6 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import DatasetMetadataAccessRights from "@/views/study/dataset/metadata/access-r
import DatasetMetadataDataManagement from "@/views/study/dataset/metadata/data-management/DatasetMetadataDataManagement.vue";
import DatasetMetadataGeneralInformation from "@/views/study/dataset/metadata/general-information/DatasetMetadataGeneralInformation.vue";
import DatasetMetadataIdentifiers from "@/views/study/dataset/metadata/identifiers/DatasetMetadataIdentifiers.vue";
import InformativePage from "@/views/study/dataset/metadata/informative-page/InformativePage.vue";
import DatasetMetadataRelatedIdentifiers from "@/views/study/dataset/metadata/related/DatasetMetadataRelatedIdentifiers.vue";
import DatasetMetadataTeam from "@/views/study/dataset/metadata/team/DatasetMetadataTeam.vue";
import NewDataset from "@/views/study/dataset/new/NewDataset.vue";
Expand Down Expand Up @@ -272,6 +273,11 @@ const router = createRouter({
path: "identifiers",
component: DatasetMetadataIdentifiers,
},
{
name: "dataset:metadata:informative",
path: "informative",
component: InformativePage,
},
{
name: "dataset:metadata:general-information",
path: "general-information",
Expand Down
32 changes: 28 additions & 4 deletions src/views/study/dataset/metadata/about/DatasetMetadataOther.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const route = useRoute();
const push = usePush();

const studyStore = useStudyStore();
const router = useRouter();

const routeParams = {
datasetId: route.params.datasetId as string,
Expand Down Expand Up @@ -123,7 +124,10 @@ const saveMetadata = (e: MouseEvent) => {
}

push.success("Metadata saved successfully");

router.push({
name: "dataset:metadata:informative",
params: { datasetId: datasetId, studyId },
});
console.log("success");
} else {
console.log("error");
Expand All @@ -146,6 +150,13 @@ const scrollToSection = (key: string) => {
const section = document.querySelector(`.${key}`) as HTMLElement;
scrollbarRef.value?.scrollTo({ behavior: "smooth", top: section.offsetTop });
};

const previousPage = () => {
router.push({
name: "dataset:metadata:related-identifiers",
params: { datasetId: datasetId, studyId },
});
};
</script>

<template>
Expand Down Expand Up @@ -325,7 +336,20 @@ const scrollToSection = (key: string) => {

<n-divider />

<div class="flex justify-start">
<div class="flex justify-between gap-4">
<n-button
size="large"
type="primary"
@click="previousPage"
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="ic:round-arrow-back-ios" />
</template>

Back
</n-button>

<n-button
size="large"
type="primary"
Expand All @@ -334,10 +358,10 @@ const scrollToSection = (key: string) => {
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="material-symbols:save" />
<f-icon icon="ic:round-arrow-forward-ios" />
</template>

Save Metadata
Next
</n-button>
</div>
</n-form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const route = useRoute();
const push = usePush();

const studyStore = useStudyStore();
const router = useRouter();

const routeParams = {
datasetId: route.params.datasetId as string,
Expand Down Expand Up @@ -134,6 +135,10 @@ const saveMetadata = (e: MouseEvent) => {
}

push.success("Access details were saved successfully");
router.push({
name: "dataset:metadata:related-identifiers",
params: { datasetId: datasetId, studyId },
});

console.log("success");
} else {
Expand Down Expand Up @@ -208,6 +213,13 @@ const scrollToSection = (key: string) => {
const section = document.querySelector(`.${key}`) as HTMLElement;
scrollbarRef.value?.scrollTo({ behavior: "smooth", top: section.offsetTop });
};

const previousPage = () => {
router.push({
name: "dataset:metadata:data-management",
params: { datasetId: datasetId, studyId },
});
};
</script>

<template>
Expand Down Expand Up @@ -347,7 +359,19 @@ const scrollToSection = (key: string) => {

<n-divider />

<div class="flex justify-start pt-4">
<div class="flex justify-between gap-4">
<n-button
size="large"
type="primary"
@click="previousPage"
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="ic:round-arrow-back-ios" />
</template>
Back
</n-button>

<n-button
size="large"
type="primary"
Expand All @@ -356,9 +380,9 @@ const scrollToSection = (key: string) => {
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="material-symbols:save" />
<f-icon icon="ic:round-arrow-forward-ios" />
</template>
Save Metadata
Next
</n-button>
</div>
</n-form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const route = useRoute();
const push = usePush();

const studyStore = useStudyStore();
const router = useRouter();

const routeParams = {
datasetId: route.params.datasetId as string,
Expand Down Expand Up @@ -153,6 +154,10 @@ const saveMetadata = (e: MouseEvent) => {
}

push.success("Status saved successfully");
router.push({
name: "dataset:metadata:access-rights",
params: { datasetId: datasetId, studyId },
});

console.log("success");
} else {
Expand Down Expand Up @@ -208,6 +213,13 @@ const scrollToSection = (key: string) => {
const section = document.querySelector(`.${key}`) as HTMLElement;
scrollbarRef.value?.scrollTo({ behavior: "smooth", top: section.offsetTop });
};

const previousPage = () => {
router.push({
name: "dataset:metadata:team",
params: { datasetId: datasetId, studyId },
});
};
</script>

<template>
Expand Down Expand Up @@ -578,7 +590,20 @@ const scrollToSection = (key: string) => {

<n-divider />

<div class="flex justify-start pt-4">
<div class="flex justify-between gap-4">
<n-button
size="large"
type="primary"
@click="previousPage"
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="ic:round-arrow-back-ios" />
</template>

Back
</n-button>

<n-button
size="large"
type="primary"
Expand All @@ -587,10 +612,10 @@ const scrollToSection = (key: string) => {
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="material-symbols:save" />
<f-icon icon="ic:round-arrow-forward-ios" />
</template>

Save Metadata
Next
</n-button>
</div>
</n-form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ const saveMetadata = (e: MouseEvent) => {

push.success("Dataset titles updated successfully");

// refresh page
router.go(0);
router.push({
name: "dataset:metadata:identifiers",
params: { datasetId: datasetId, studyId },
});

console.log("success");
} else {
Expand All @@ -266,15 +268,22 @@ const scrollToSection = (key: string) => {
const section = document.querySelector(`.${key}`) as HTMLElement;
scrollbarRef.value?.scrollTo({ behavior: "smooth", top: section.offsetTop });
};

const previousPage = () => {
router.push({
name: "study:all-datasets",
params: { studyId },
});
};
</script>

<template>
<main class="flex h-full w-full flex-col pr-6">
<PageBackNavigationHeader
title="General information"
title="Dataset collection"
description=""
linkName="dataset:overview"
:linkParams="{ studyId: routeParams.studyId, datasetId: routeParams.datasetId }"
linkName="study:all-datasets"
:linkParams="{ studyId: routeParams.studyId }"
/>

<n-divider />
Expand Down Expand Up @@ -308,6 +317,10 @@ const scrollToSection = (key: string) => {
label-placement="top"
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<h1 class="py-4">General information</h1>

<p>Let’s start with some high-level questions so we can understand your dataset.</p>

<h2 class="titles py-4">Titles</h2>

<n-card class="bg-gray-50">
Expand Down Expand Up @@ -560,7 +573,19 @@ const scrollToSection = (key: string) => {

<n-divider />

<div class="flex justify-start pt-4">
<div class="flex justify-between gap-4 pt-4">
<n-button
size="large"
type="primary"
@click="previousPage"
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="ic:round-arrow-back-ios" />
</template>
Back
</n-button>

<n-button
size="large"
type="primary"
Expand All @@ -569,9 +594,9 @@ const scrollToSection = (key: string) => {
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="material-symbols:save" />
<f-icon icon="ic:round-arrow-forward-ios" />
</template>
Save changes
Next
</n-button>
</div>
</n-form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ const saveMetadata = (e: MouseEvent) => {

push.success("Dataset alternative identifiers updated successfully");

// refresh page
router.go(0);
router.push({
name: "dataset:metadata:team",
params: { datasetId: datasetId, studyId },
});

console.log("success");
} else {
Expand All @@ -163,6 +165,13 @@ const scrollToSection = (key: string) => {
const section = document.querySelector(`.${key}`) as HTMLElement;
scrollbarRef.value?.scrollTo({ behavior: "smooth", top: section.offsetTop });
};

const previousPage = () => {
router.push({
name: "dataset:metadata:general-information",
params: { datasetId: datasetId, studyId },
});
};
</script>

<template>
Expand Down Expand Up @@ -308,7 +317,19 @@ const scrollToSection = (key: string) => {

<n-divider />

<div class="flex justify-start">
<div class="flex justify-between gap-4">
<n-button
size="large"
type="primary"
@click="previousPage"
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="ic:round-arrow-back-ios" />
</template>
Back
</n-button>

<n-button
size="large"
type="primary"
Expand All @@ -317,9 +338,9 @@ const scrollToSection = (key: string) => {
:disabled="studyStore.currentStudyRole === 'viewer'"
>
<template #icon>
<f-icon icon="material-symbols:save" />
<f-icon icon="ic:round-arrow-forward-ios" />
</template>
Save changes
Next
</n-button>
</div>
</div>
Expand Down
Loading