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 @@ ...@@ -15,27 +15,21 @@
:identifier="identifier" /> :identifier="identifier" />
</v-list-item-subtitle> </v-list-item-subtitle>
<template v-slot:append> <template v-slot:append>
<v-list-item-action>
<v-tooltip <v-tooltip
v-if="identifier.status === 'published'" :text="identifier.status === 'published' ? $t('pages.identifier.pid.title') : $t('pages.identifier.draft.title')"
:text="$t('pages.identifier.pid.title')"
left> left>
<template <template
v-slot:activator="{ props }"> v-slot:activator="{ props }">
{{ formatTimestampUTCLabel(identifier.created) }}
<v-icon <v-icon
color="primary" :color="identifier.status === 'published' ? 'primary' : null"
v-bind="props">mdi-identifier</v-icon> v-bind="props">
</template> {{ identifier.status === 'published' ? 'mdi-identifier' : 'mdi-pencil-outline' }}
</v-tooltip> </v-icon>
<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>
</template> </template>
</v-tooltip> </v-tooltip>
</v-list-item-action>
</template> </template>
</v-list-item> </v-list-item>
</div> </div>
...@@ -43,6 +37,7 @@ ...@@ -43,6 +37,7 @@
<script> <script>
import Banner from '@/components/identifier/Banner.vue' import Banner from '@/components/identifier/Banner.vue'
import { formatTimestampUTCLabel } from '@/utils'
import { useCacheStore } from '@/stores/cache.js' import { useCacheStore } from '@/stores/cache.js'
export default { export default {
...@@ -102,6 +97,7 @@ export default { ...@@ -102,6 +97,7 @@ export default {
this.init() this.init()
}, },
methods: { methods: {
formatTimestampUTCLabel,
href (identifier) { href (identifier) {
if (!identifier) { if (!identifier) {
return null return null
......
...@@ -272,7 +272,7 @@ export default { ...@@ -272,7 +272,7 @@ export default {
if (!this.database || !this.database.identifiers) { if (!this.database || !this.database.identifiers) {
return [] 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 () { pid () {
return this.$route.query.pid return this.$route.query.pid
......
...@@ -127,4 +127,7 @@ public class IdentifierDto { ...@@ -127,4 +127,7 @@ public class IdentifierDto {
@Schema(example = "draft") @Schema(example = "draft")
private IdentifierStatusTypeDto status; private IdentifierStatusTypeDto status;
@NotNull
private Instant created;
} }
...@@ -658,18 +658,18 @@ class Identifier(BaseModel): ...@@ -658,18 +658,18 @@ class Identifier(BaseModel):
publisher: str publisher: str
creators: List[Creator] creators: List[Creator]
titles: List[IdentifierTitle] titles: List[IdentifierTitle]
descriptions: List[IdentifierDescription] descriptions: Optional[List[IdentifierDescription]] = None
funders: Optional[List[IdentifierFunder]] = field(default_factory=list) funders: Optional[List[IdentifierFunder]] = None
doi: Optional[str] = None doi: Optional[str] = None
language: 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 query_id: Optional[str] = None
table_id: Optional[str] = None table_id: Optional[str] = None
view_id: Optional[str] = None view_id: Optional[str] = None
query: Optional[str] = None query: Optional[str] = None
query_normalized: Optional[str] = None query_normalized: Optional[str] = None
execution: 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_hash: Optional[str] = None
result_number: Optional[int] = None result_number: Optional[int] = None
publication_day: 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 to comment