|
Lines 107-116
export default {
Link Here
|
| 107 |
}, |
107 |
}, |
| 108 |
computed: { |
108 |
computed: { |
| 109 |
local_packages_url() { |
109 |
local_packages_url() { |
| 110 |
return build_url( |
110 |
let { href } = this.$router.resolve({ |
| 111 |
"/cgi-bin/koha/erm/eholdings/local/packages", |
111 |
name: "EHoldingsLocalPackagesList", |
| 112 |
this.filters |
112 |
}) |
| 113 |
) |
113 |
return build_url(href, this.filters) |
| 114 |
}, |
114 |
}, |
| 115 |
}, |
115 |
}, |
| 116 |
beforeRouteEnter(to, from, next) { |
116 |
beforeRouteEnter(to, from, next) { |
|
Lines 120-134
export default {
Link Here
|
| 120 |
}, |
120 |
}, |
| 121 |
methods: { |
121 |
methods: { |
| 122 |
show_package: function (package_id) { |
122 |
show_package: function (package_id) { |
| 123 |
this.$router.push( |
123 |
this.$router.push({ |
| 124 |
"/cgi-bin/koha/erm/eholdings/ebsco/packages/" + package_id |
124 |
name: "EHoldingsEBSCOPackagesShow", |
| 125 |
) |
125 |
params: { package_id }, |
|
|
126 |
}) |
| 126 |
}, |
127 |
}, |
| 127 |
filter_table: async function () { |
128 |
filter_table: async function () { |
| 128 |
let new_route = build_url( |
129 |
let { href } = this.$router.resolve({ |
| 129 |
"/cgi-bin/koha/erm/eholdings/ebsco/packages", |
130 |
name: "EHoldingsEBSCOPackagesShow", |
| 130 |
this.filters |
131 |
}) |
| 131 |
) |
132 |
let new_route = build_url(href, this.filters) |
| 132 |
this.$router.push(new_route) |
133 |
this.$router.push(new_route) |
| 133 |
this.show_table = true |
134 |
this.show_table = true |
| 134 |
this.local_count_packages = null |
135 |
this.local_count_packages = null |
|
Lines 157-162
export default {
Link Here
|
| 157 |
let show_package = this.show_package |
158 |
let show_package = this.show_package |
| 158 |
let get_lib_from_av = this.get_lib_from_av |
159 |
let get_lib_from_av = this.get_lib_from_av |
| 159 |
let map_av_dt_filter = this.map_av_dt_filter |
160 |
let map_av_dt_filter = this.map_av_dt_filter |
|
|
161 |
let router = this.$router |
| 160 |
|
162 |
|
| 161 |
if (!this.show_table) { |
163 |
if (!this.show_table) { |
| 162 |
this.show_table = build_url_params(this.filters).length |
164 |
this.show_table = build_url_params(this.filters).length |
|
Lines 262-274
export default {
Link Here
|
| 262 |
let tr = $(this).parent() |
264 |
let tr = $(this).parent() |
| 263 |
let row = api.row(tr).data() |
265 |
let row = api.row(tr).data() |
| 264 |
if (!row) return // Happen if the table is empty |
266 |
if (!row) return // Happen if the table is empty |
|
|
267 |
let { href } = router.resolve({ |
| 268 |
name: "EHoldingsEBSCOPackagesShow", |
| 269 |
params: { package_id: row.package_id }, |
| 270 |
}) |
| 265 |
let n = createVNode( |
271 |
let n = createVNode( |
| 266 |
"a", |
272 |
"a", |
| 267 |
{ |
273 |
{ |
| 268 |
role: "button", |
274 |
role: "button", |
| 269 |
href: |
275 |
href, |
| 270 |
"/cgi-bin/koha/erm/eholdings/ebsco/packages/" + |
|
|
| 271 |
row.package_id, |
| 272 |
onClick: e => { |
276 |
onClick: e => { |
| 273 |
e.preventDefault() |
277 |
e.preventDefault() |
| 274 |
show_package(row.package_id) |
278 |
show_package(row.package_id) |