Skip to content
Snippets Groups Projects
Verified Commit 9f84553f authored by Martin Weise's avatar Martin Weise
Browse files
parent 12b732b8
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -15,27 +15,21 @@
:identifier="identifier" />
</v-list-item-subtitle>
<template v-slot:append>
<v-list-item-action>
<v-tooltip
v-if="identifier.status === 'published'"
:text="$t('pages.identifier.pid.title')"
:text="identifier.status === 'published' ? $t('pages.identifier.pid.title') : $t('pages.identifier.draft.title')"
left>
<template
v-slot:activator="{ props }">
{{ formatTimestampUTCLabel(identifier.created) }}
<v-icon
color="primary"
v-bind="props">mdi-identifier</v-icon>
</template>
</v-tooltip>
<v-tooltip
v-else
:text="$t('pages.identifier.draft.title')"
left>
<template
v-slot:activator="{ props }">
<v-icon
v-bind="props">mdi-pencil-outline</v-icon>
:color="identifier.status === 'published' ? 'primary' : null"
v-bind="props">
{{ identifier.status === 'published' ? 'mdi-identifier' : 'mdi-pencil-outline' }}
</v-icon>
</template>
</v-tooltip>
</v-list-item-action>
</template>
</v-list-item>
</div>
......@@ -43,6 +37,7 @@
<script>
import Banner from '@/components/identifier/Banner.vue'
import { formatTimestampUTCLabel } from '@/utils'
import { useCacheStore } from '@/stores/cache.js'
export default {
......@@ -102,6 +97,7 @@ export default {
this.init()
},
methods: {
formatTimestampUTCLabel,
href (identifier) {
if (!identifier) {
return null
......
......@@ -272,7 +272,7 @@ export default {
if (!this.database || !this.database.identifiers) {
return []
}
return this.database.identifiers.filter(i => i.query_id === this.$route.params.subset_id)
return this.database.identifiers.filter(i => i.database_id === this.$route.params.database_id)
},
pid () {
return this.$route.query.pid
......
......@@ -127,4 +127,7 @@ public class IdentifierDto {
@Schema(example = "draft")
private IdentifierStatusTypeDto status;
@NotNull
private Instant created;
}
......@@ -658,18 +658,18 @@ class Identifier(BaseModel):
publisher: str
creators: List[Creator]
titles: List[IdentifierTitle]
descriptions: List[IdentifierDescription]
funders: Optional[List[IdentifierFunder]] = field(default_factory=list)
descriptions: Optional[List[IdentifierDescription]] = None
funders: Optional[List[IdentifierFunder]] = None
doi: Optional[str] = None
language: Optional[str] = None
licenses: Optional[List[License]] = field(default_factory=list)
licenses: Optional[List[License]] = None
query_id: Optional[str] = None
table_id: Optional[str] = None
view_id: Optional[str] = None
query: Optional[str] = None
query_normalized: Optional[str] = None
execution: Optional[str] = None
related_identifiers: Optional[List[RelatedIdentifier]] = field(default_factory=list)
related_identifiers: Optional[List[RelatedIdentifier]] = None
result_hash: Optional[str] = None
result_number: Optional[int] = None
publication_day: Optional[int] = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment