mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 15:36:22 +08:00
Merge pull request #6278 from lasniscinote/gl_SCI_9153_v2
Added a missing RepositoryTimeValue component [SCI-9153]
This commit is contained in:
commit
1ff89787f0
|
@ -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 {
|
||||
|
|
|
@ -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>
|
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue