-
Notifications
You must be signed in to change notification settings - Fork 5
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 #185 from rwth-acis/release/2.2.0
Release/2.2.0
- Loading branch information
Showing
10 changed files
with
256 additions
and
89 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
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,49 @@ | ||
<template> | ||
<Breadcrumb :home="home" :model="items" /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { computed, defineComponent, toRefs } from 'vue'; | ||
export default defineComponent({ | ||
name: 'ProjectBreadcrumbNav', | ||
props: { | ||
projectId: { type: Number, required: true }, | ||
projectName: { type: String, required: false, default: 'Project Home' }, | ||
categoryId: { type: Number, required: false }, | ||
categoryName: { type: String, required: false, default: 'Parent Category' }, | ||
requirementId: { type: Number, required: false }, | ||
requirementName: { type: String, required: false }, | ||
}, | ||
setup: (props) => { | ||
const { projectId, projectName, categoryId, categoryName, requirementId, requirementName } = toRefs(props); | ||
const home = computed(() => { | ||
return { | ||
label: 'Public Projects', | ||
to: `/projects` | ||
} | ||
}); | ||
const items = computed(() => { | ||
const menuItems: { label: string, to?: string }[] = [ | ||
{ label: projectName.value, to: `/projects/${projectId.value}` } | ||
]; | ||
if (categoryId.value && categoryName.value) { | ||
menuItems.push({ label: categoryName.value, to: `/projects/${projectId.value}/categories/${categoryId.value}` }); | ||
if (requirementId.value && requirementName.value) { | ||
menuItems.push({ label: requirementName.value, to: `/projects/${projectId.value}/requirements/${requirementId.value}` }); | ||
} | ||
} | ||
return menuItems; | ||
}); | ||
return { | ||
home, | ||
items, | ||
}; | ||
}, | ||
}) | ||
</script> |
Oops, something went wrong.