diff --git a/backend/projects/serializers.py b/backend/projects/serializers.py
index 51cd956d..d117b590 100644
--- a/backend/projects/serializers.py
+++ b/backend/projects/serializers.py
@@ -49,6 +49,13 @@ class TagSerializer(serializers.ModelSerializer):
class ProjectSerializer(serializers.ModelSerializer):
tags = TagSerializer(many=True, required=False)
+ author = serializers.SerializerMethodField()
+
+ @classmethod
+ def get_author(cls, instance):
+ if instance.created_by:
+ return instance.created_by.username
+ return ""
class Meta:
model = Project
@@ -58,9 +65,10 @@ class ProjectSerializer(serializers.ModelSerializer):
"description",
"guideline",
"project_type",
+ "created_at",
"updated_at",
"random_order",
- "created_by",
+ "author",
"collaborative_annotation",
"single_class_classification",
"is_text_project",
@@ -71,7 +79,9 @@ class ProjectSerializer(serializers.ModelSerializer):
"tags",
]
read_only_fields = (
+ "created_at",
"updated_at",
+ "author",
"is_text_project",
"can_define_label",
"can_define_relation",
diff --git a/frontend/components/project/ProjectList.vue b/frontend/components/project/ProjectList.vue
index 07379e21..4f21186c 100644
--- a/frontend/components/project/ProjectList.vue
+++ b/frontend/components/project/ProjectList.vue
@@ -34,9 +34,9 @@
{{ item.name }}
-
+
{{
- item.updatedAt | dateParse('YYYY-MM-DDTHH:mm:ss') | dateFormat('DD/MM/YYYY HH:mm')
+ item.createdAt | dateParse('YYYY-MM-DDTHH:mm:ss') | dateFormat('DD/MM/YYYY HH:mm')
}}
@@ -93,7 +93,8 @@ export default Vue.extend({
{ text: this.$t('generic.name'), value: 'name' },
{ text: this.$t('generic.description'), value: 'description' },
{ text: this.$t('generic.type'), value: 'projectType' },
- { text: 'Updated', value: 'updatedAt' },
+ { text: 'Created', value: 'createdAt' },
+ { text: 'Author', value: 'author' },
{ text: 'Tags', value: 'tags' }
]
}
diff --git a/frontend/domain/models/project/project.ts b/frontend/domain/models/project/project.ts
index 4755a8d3..be4afb84 100644
--- a/frontend/domain/models/project/project.ts
+++ b/frontend/domain/models/project/project.ts
@@ -18,7 +18,9 @@ export class ProjectReadItem {
readonly users: number[],
readonly tags: Object[],
readonly projectType: ProjectType,
+ readonly createdAt: string,
readonly updatedAt: string,
+ readonly author: string,
readonly randomOrder: boolean,
readonly collaborativeAnnotation: boolean,
readonly exclusiveCategories: boolean,
diff --git a/frontend/repositories/project/apiProjectRepository.ts b/frontend/repositories/project/apiProjectRepository.ts
index 26500f22..2d5486f0 100644
--- a/frontend/repositories/project/apiProjectRepository.ts
+++ b/frontend/repositories/project/apiProjectRepository.ts
@@ -11,7 +11,9 @@ function toModel(item: { [key: string]: any }): ProjectReadItem {
item.users,
item.tags,
item.project_type,
+ item.created_at,
item.updated_at,
+ item.author,
item.random_order,
item.collaborative_annotation,
item.single_class_classification,
diff --git a/frontend/services/application/project/projectData.ts b/frontend/services/application/project/projectData.ts
index baa07603..49f8d006 100644
--- a/frontend/services/application/project/projectData.ts
+++ b/frontend/services/application/project/projectData.ts
@@ -6,7 +6,9 @@ export class ProjectDTO {
description: string
guideline: string
projectType: ProjectType
+ createdAt: string
updatedAt: string
+ author: string
enableRandomOrder: boolean
enableShareAnnotation: boolean
singleClassClassification: boolean
@@ -29,7 +31,9 @@ export class ProjectDTO {
this.description = item.description
this.guideline = item.guideline
this.projectType = item.projectType
+ this.createdAt = item.createdAt
this.updatedAt = item.updatedAt
+ this.author = item.author
this.enableRandomOrder = item.randomOrder
this.enableShareAnnotation = item.collaborativeAnnotation
this.singleClassClassification = item.exclusiveCategories