diff --git a/client/src/components/portfolio/ProjectWidget.vue b/client/src/components/portfolio/ProjectWidget.vue
index 2ac339ec..00403945 100644
--- a/client/src/components/portfolio/ProjectWidget.vue
+++ b/client/src/components/portfolio/ProjectWidget.vue
@@ -4,9 +4,9 @@
-
+
-
+
Projekt löschen
Projekt bearbeiten
@@ -23,7 +23,7 @@
import WidgetFooter from '@/components/WidgetFooter';
export default {
- props: ['title', 'appearance', 'slug', 'id', 'final', 'isTeacher'],
+ props: ['title', 'appearance', 'slug', 'id', 'final', 'student', 'userId'],
components: {
WidgetFooter,
@@ -32,8 +32,14 @@
},
computed: {
- widgetClass() {
+ widgetClass () {
return `project-widget--${this.appearance}`;
+ },
+ isOwner () {
+ return this.student.id === this.userId;
+ },
+ owner () {
+ return `${this.student.firstName} ${this.student.lastName}`
}
},
diff --git a/client/src/graphql/gql/fragments/projectParts.gql b/client/src/graphql/gql/fragments/projectParts.gql
index c0d1a8b5..9d0bafe3 100644
--- a/client/src/graphql/gql/fragments/projectParts.gql
+++ b/client/src/graphql/gql/fragments/projectParts.gql
@@ -6,4 +6,9 @@ fragment ProjectParts on ProjectNode {
slug
objectives
final
+ student {
+ firstName
+ lastName
+ id
+ }
}
diff --git a/client/src/pages/portfolio.vue b/client/src/pages/portfolio.vue
index 2197a961..d4bf8304 100644
--- a/client/src/pages/portfolio.vue
+++ b/client/src/pages/portfolio.vue
@@ -6,7 +6,7 @@