Bugzilla – Attachment 146618 Details for
Bug 32932
Re-structure Vue router-links to use "name" instead of urls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32932: Update router to use name property for licences
Bug-32932-Update-router-to-use-name-property-for-l.patch (text/plain), 6.72 KB, created by
Matt Blenkinsop
on 2023-02-14 14:03:43 UTC
(
hide
)
Description:
Bug 32932: Update router to use name property for licences
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-02-14 14:03:43 UTC
Size:
6.72 KB
patch
obsolete
>From 76d9ed6826eff45e2fa0293b5a8dbe53ac4d8d0d Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Tue, 14 Feb 2023 14:02:40 +0000 >Subject: [PATCH] Bug 32932: Update router to use name property for licences > >As per previous commit for agreements >--- > .../prog/js/vue/components/ERM/LicensesFormAdd.vue | 6 +++--- > .../js/vue/components/ERM/LicensesFormConfirmDelete.vue | 4 ++-- > .../prog/js/vue/components/ERM/LicensesList.vue | 6 +++--- > .../prog/js/vue/components/ERM/LicensesShow.vue | 6 +++--- > .../prog/js/vue/components/ERM/LicensesToolbar.vue | 2 +- > 5 files changed, 12 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue >index b5034591e24..0510249f3a7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue >@@ -133,7 +133,7 @@ > <fieldset class="action"> > <input type="submit" :value="$__('Submit')" /> > <router-link >- to="/cgi-bin/koha/erm/licenses" >+ :to="{ name: 'LicensesList' }" > role="button" > class="cancel" > >{{ $__("Cancel") }}</router-link >@@ -268,10 +268,10 @@ export default { > .then( > response => { > if (response.status == 200) { >- this.$router.push("/cgi-bin/koha/erm/licenses") >+ this.$router.push({ name: 'LicensesList' }) > setMessage(this.$__("License updated")) > } else if (response.status == 201) { >- this.$router.push("/cgi-bin/koha/erm/licenses") >+ this.$router.push({ name: 'LicensesList' }) > setMessage(this.$__("License created")) > } else { > setError(response.message || response.statusText) >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormConfirmDelete.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormConfirmDelete.vue >index 1de737b10a6..c853809a3d3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormConfirmDelete.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormConfirmDelete.vue >@@ -23,7 +23,7 @@ > :value="$__('Yes, delete')" > /> > <router-link >- to="/cgi-bin/koha/erm/licenses" >+ :to="{ name: 'LicensesList' }" > role="button" > class="cancel" > >{{ $__("No, do not delete") }}</router-link >@@ -72,7 +72,7 @@ export default { > fetch(apiUrl, options) > .then(response => { > if (response.status == 204) { >- this.$router.push("/cgi-bin/koha/erm/licenses") >+ this.$router.push({ name: 'LicensesList' }) > setMessage(this.$__("License deleted")) > } else { > setError(response.message || response.statusText) >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >index c8d80b3d223..584ee94eb9d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >@@ -54,13 +54,13 @@ export default { > this.initialized = true > }, > show_license: function (license_id) { >- this.$router.push("/cgi-bin/koha/erm/licenses/" + license_id) >+ this.$router.push({ name: 'LicensesShow', params: { license_id } }) > }, > edit_license: function (license_id) { >- this.$router.push("/cgi-bin/koha/erm/licenses/edit/" + license_id) >+ this.$router.push({ name: 'LicensesFormAddEdit', params: { license_id } }) > }, > delete_license: function (license_id) { >- this.$router.push("/cgi-bin/koha/erm/licenses/delete/" + license_id) >+ this.$router.push({ name: 'LicensesFormConfirmDelete', params: { license_id } }) > }, > build_datatable: function () { > let show_license = this.show_license >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >index 358dd52b38a..7ddcf0c2fa2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue >@@ -5,12 +5,12 @@ > {{ $__("License #%s").format(license.license_id) }} > <span class="action_links"> > <router-link >- :to="`/cgi-bin/koha/erm/licenses/edit/${license.license_id}`" >+ :to="{ name: 'LicensesFormAddEdit', params: { license_id: license.license_id } }" > :title="$__('Edit')" > ><i class="fa fa-pencil"></i > ></router-link> > <router-link >- :to="`/cgi-bin/koha/erm/licenses/delete/${license.license_id}`" >+ :to="{ name: 'LicensesFormConfirmDelete', params: { license_id: license.license_id } }" > :title="$__('Delete')" > ><i class="fa fa-trash"></i > ></router-link> >@@ -133,7 +133,7 @@ > </fieldset> > <fieldset class="action"> > <router-link >- to="/cgi-bin/koha/erm/licenses" >+ :to="{ name: 'LicensesList' }" > role="button" > class="cancel" > >{{ $__("Close") }}</router-link >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesToolbar.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesToolbar.vue >index 510fbff57e9..829ed5a47a1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesToolbar.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesToolbar.vue >@@ -1,6 +1,6 @@ > <template> > <div id="toolbar" class="btn-toolbar"> >- <router-link to="/cgi-bin/koha/erm/licenses/add" class="btn btn-default" >+ <router-link :to="{ name: 'LicensesFormAdd' }" class="btn btn-default" > ><font-awesome-icon icon="plus" /> > {{ $__("New license") }}</router-link > > >-- >2.37.1 (Apple Git-137.1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32932
:
146439
|
146442
|
146616
|
146617
|
146618
|
146624
|
146625
|
146965
|
146966
|
146967
|
146968
|
147119
|
147120
|
147121
|
147122
|
148115
|
148551
|
148552
|
148553
|
148554
|
148558
|
148559
|
148560
|
148561
|
149210
|
149707
|
149709
|
149934
|
149935
|
151529
|
152231