Skip to content
Snippets Groups Projects
Commit 9843f119 authored by Manikanth Dindigala's avatar Manikanth Dindigala
Browse files

refactor: updating the paths

parent 93a30107
No related branches found
No related tags found
1 merge request!62fix: search result list navigation error
Pipeline #220264 passed
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<script> <script>
import editions from "../utilities/editionLinks"; import editions from "../utilities/editionLinks";
import pathUrl from "../mixin/pathUrl.js" import pathUrl from "../mixin/pathUrl.js";
export default { export default {
data: () => ({ data: () => ({
......
...@@ -89,7 +89,9 @@ export default { ...@@ -89,7 +89,9 @@ export default {
this.query = query; this.query = query;
this.page = 1; this.page = 1;
this.search(this.query.trim(), 0, this.size) this.search(this.query.trim(), 0, this.size);
this.$router.push({ query: { ...this.$route.query, searchTerm:query } });
}, },
async search(value, from, size) { async search(value, from, size) {
try { try {
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
</template> </template>
<script> <script>
import pathUrl from "../mixin/pathUrl.js";
export default { export default {
data() { data() {
return { return {
...@@ -40,6 +42,9 @@ export default { ...@@ -40,6 +42,9 @@ export default {
}, },
}; };
}, },
mixins: [
pathUrl
],
computed: { computed: {
viewerBaseUrl() { viewerBaseUrl() {
return process.env.VUE_APP_BASE_URL_VIEWER; return process.env.VUE_APP_BASE_URL_VIEWER;
...@@ -71,7 +76,7 @@ export default { ...@@ -71,7 +76,7 @@ export default {
} else if (item.lang === 'syc') { } else if (item.lang === 'syc') {
language = 'syriac'; language = 'syriac';
} }
return `${this.viewerBaseUrl}/${language}/#/?itemurl=${item.item}&source=external&searchTerm=${item.searchTerm}&redirectUrl=${window.location.href.replace(/\?(.*)/g,'')}`; return `${this.viewerBaseUrl}/${language}/#/?itemurl=${item.item}&source=external&searchTerm=${item.searchTerm}&redirectUrl=${this.getPath}`;
}, },
}, },
watch: { watch: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment