Merge pull request #6278 from lasniscinote/gl_SCI_9153_v2

Added a missing RepositoryTimeValue component [SCI-9153]
This commit is contained in:
Alex Kriuchykhin 2023-09-25 14:05:17 +02:00 committed by GitHub
commit 1ff89787f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 18 deletions

View file

@ -16,15 +16,12 @@
<nav class="w-full">
<ul class="flex flex-col gap-3 text-right list-none">
<li v-for="nav in navigations" :key="nav.value" class="cursor-pointer inline-block relative">
<span
:class="`${activeNav === nav.value ? 'text-sn-science-blue' : 'text-sn-grey'} mr-8 transition-colors`"
@click.prevent="hightlightContent(nav.value)"
>
<span :class="`${activeNav === nav.value ? 'text-sn-science-blue' : 'text-sn-grey'} mr-8 transition-colors`"
@click.prevent="hightlightContent(nav.value)">
{{ nav.label }}
</span>
<span
:class="`${activeNav === nav.value ? 'bg-sn-science-blue w-1 inset-y-0 right-0.5' : 'transparent hidden'} absolute transition-all rounded`"
>
:class="`${activeNav === nav.value ? 'bg-sn-science-blue w-1 inset-y-0 right-0.5' : 'transparent hidden'} absolute transition-all rounded`">
</span>
</li>
</ul>
@ -128,7 +125,8 @@
<div id="divider" class="w-500 bg-sn-light-grey flex px-8 items-center self-stretch h-px "></div>
<section id="qr_wrapper">
<h4 class="font-inter text-base font-semibold leading-7 mb-4 mt-0">{{ i18n.t('repositories.item_card.navigations.qr') }}</h4>
<h4 class="font-inter text-base font-semibold leading-7 mb-4 mt-0">{{
i18n.t('repositories.item_card.navigations.qr') }}</h4>
<div class="bar-code-container">
<canvas id="bar-code-canvas" class="hidden"></canvas>
<img id="bar-code-image" />
@ -162,6 +160,7 @@ import RepositoryDateTimeRangeValue from './repository_values/RepositoryDateTime
import RepositoryDateValue from './repository_values/RepositoryDateValue.vue';
import RepositoryDateRangeValue from './repository_values/RepositoryDateRangeValue.vue';
import RepositoryTimeRangeValue from './repository_values/RepositoryTimeRangeValue.vue'
import RepositoryTimeValue from './repository_values/RepositoryTimeValue.vue'
export default {
name: 'RepositoryItemSidebar',
@ -178,6 +177,7 @@ export default {
RepositoryDateValue,
RepositoryDateRangeValue,
RepositoryTimeRangeValue,
RepositoryTimeValue
},
data() {
return {

View file

@ -0,0 +1,37 @@
<template>
<div id="repository-time-value-wrapper" class="flex flex-col min-min-h-[46px] h-auto gap-[6px]">
<div class="font-inter text-sm font-semibold leading-5">
{{ colName }}
</div>
<div v-if="formatted" class="text-sn-dark-grey font-inter text-sm font-normal leading-5 flex">
<div>
{{ formatted }}
</div>
</div>
<div v-else class="text-sn-dark-grey font-inter text-sm font-normal leading-5">
{{ i18n.t('repositories.item_card.repository_time_value.no_time') }}
</div>
</div>
</template>
<script>
export default {
name: 'RepositoryTimeValue',
props: {
data_type: String,
colId: Number,
colName: String,
colVal: Object
},
data() {
return {
formatted: null,
datetime: null
}
},
created() {
this.formatted = this.colVal.formatted
this.datetime = this.colVal.datetime
}
}
</script>

View file

@ -2145,6 +2145,8 @@ en:
no_checklist: 'No selection'
repository_asset_value:
no_asset: 'No file'
repository_time_value:
no_time: 'No time'
repository_stock_values:
manage_modal:
title: "Stock %{item}"