Lines 1-14
Link Here
|
1 |
<template> |
1 |
<template> |
2 |
<div> |
2 |
<div> |
3 |
<div v-if="!initialized">{{ $__("Loading") }}</div> |
3 |
<div v-if="!initialized">{{ $__("Loading") }}</div> |
4 |
<div v-else-if="titles" id="titles_list"> |
4 |
<div v-else-if="title_count" id="titles_list"> |
5 |
<Toolbar /> |
5 |
<Toolbar /> |
6 |
<div |
6 |
<div v-if="title_count" id="title_list_result" class="page-section"> |
7 |
v-if="titles.length" |
7 |
<table v-if="title_count" :id="table_id"></table> |
8 |
id="title_list_result" |
|
|
9 |
class="page-section" |
10 |
> |
11 |
<table v-if="titles.length" :id="table_id"></table> |
12 |
</div> |
8 |
</div> |
13 |
<div v-else-if="initialized" class="dialog message"> |
9 |
<div v-else-if="initialized" class="dialog message"> |
14 |
{{ $__("There are no titles defined") }} |
10 |
{{ $__("There are no titles defined") }} |
Lines 21-27
Link Here
|
21 |
import Toolbar from "./EHoldingsLocalTitlesToolbar.vue" |
17 |
import Toolbar from "./EHoldingsLocalTitlesToolbar.vue" |
22 |
import { inject, createVNode, render } from "vue" |
18 |
import { inject, createVNode, render } from "vue" |
23 |
import { storeToRefs } from "pinia" |
19 |
import { storeToRefs } from "pinia" |
24 |
import { fetchLocalTitles } from "../../fetch" |
20 |
import { fetchLocalTitleCount } from "../../fetch" |
25 |
import { useDataTable } from "../../composables/datatables" |
21 |
import { useDataTable } from "../../composables/datatables" |
26 |
|
22 |
|
27 |
export default { |
23 |
export default { |
Lines 42-48
export default {
Link Here
|
42 |
}, |
38 |
}, |
43 |
data: function () { |
39 |
data: function () { |
44 |
return { |
40 |
return { |
45 |
titles: [], |
41 |
title_count: undefined, |
46 |
initialized: false, |
42 |
initialized: false, |
47 |
filters: { |
43 |
filters: { |
48 |
publication_title: this.$route.query.publication_title || "", |
44 |
publication_title: this.$route.query.publication_title || "", |
Lines 53-65
export default {
Link Here
|
53 |
}, |
49 |
}, |
54 |
beforeRouteEnter(to, from, next) { |
50 |
beforeRouteEnter(to, from, next) { |
55 |
next(vm => { |
51 |
next(vm => { |
56 |
vm.getTitles().then(() => vm.build_datatable()) |
52 |
vm.getTitleCount().then(() => vm.build_datatable()) |
57 |
}) |
53 |
}) |
58 |
}, |
54 |
}, |
59 |
methods: { |
55 |
methods: { |
60 |
async getTitles() { |
56 |
async getTitleCount() { |
61 |
const titles = await fetchLocalTitles() |
57 |
this.title_count = await fetchLocalTitleCount() |
62 |
this.titles = titles |
|
|
63 |
this.initialized = true |
58 |
this.initialized = true |
64 |
}, |
59 |
}, |
65 |
show_title: function (title_id) { |
60 |
show_title: function (title_id) { |