Bugzilla – Attachment 148552 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), 5.37 KB, created by
Agustín Moyano
on 2023-03-22 14:13:25 UTC
(
hide
)
Description:
Bug 32932: Update router to use name property for licences
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2023-03-22 14:13:25 UTC
Size:
5.37 KB
patch
obsolete
>From 5eed633462793550c43d155ff46745c7b54487d5 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 22 Mar 2023 09:28:08 -0300 >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 +++--- > .../prog/js/vue/components/ERM/LicensesList.vue | 7 +++++-- > .../prog/js/vue/components/ERM/LicensesShow.vue | 9 ++++++--- > .../prog/js/vue/components/ERM/LicensesToolbar.vue | 2 +- > 4 files changed, 15 insertions(+), 9 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 272253cadf..d93ee9c51c 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 >@@ -135,7 +135,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 >@@ -266,7 +266,7 @@ export default { > client.licenses.update(license, license_id).then( > success => { > setMessage(this.$__("License updated")) >- this.$router.push("/cgi-bin/koha/erm/licenses") >+ this.$router.push({ name: "LicensesList" }) > }, > error => {} > ) >@@ -274,7 +274,7 @@ export default { > client.licenses.create(license).then( > success => { > setMessage(this.$__("License created")) >- this.$router.push("/cgi-bin/koha/erm/licenses") >+ this.$router.push({ name: "LicensesList" }) > }, > error => {} > ) >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 b42355685c..a8ae7781b8 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 >@@ -63,10 +63,13 @@ export default { > ) > }, > 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, license_name) { > this.setConfirmationDialog( >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 64c1349cf2..5abe50fcce 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,7 +5,10 @@ > {{ $__("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> >@@ -131,7 +134,7 @@ > </fieldset> > <fieldset class="action"> > <router-link >- to="/cgi-bin/koha/erm/licenses" >+ :to="{ name: 'LicensesList' }" > role="button" > class="cancel" > >{{ $__("Close") }}</router-link >@@ -216,7 +219,7 @@ export default { > ), > true > ) >- this.$router.push("/cgi-bin/koha/erm/licenses") >+ this.$router.push({ name: 'LicensesList' }) > }, > error => {} > ) >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 510fbff57e..829ed5a47a 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.25.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