Bugzilla – Attachment 147120 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.90 KB, created by
Matt Blenkinsop
on 2023-02-22 10:47:07 UTC
(
hide
)
Description:
Bug 32932: Update router to use name property for licences
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-02-22 10:47:07 UTC
Size:
6.90 KB
patch
obsolete
>From 45a4a459470f76544417a45cb0429a6dd73690ec 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 +++--- > .../vue/components/ERM/LicensesFormConfirmDelete.vue | 4 ++-- > .../prog/js/vue/components/ERM/LicensesList.vue | 12 +++++++++--- > .../prog/js/vue/components/ERM/LicensesShow.vue | 12 +++++++++--- > .../prog/js/vue/components/ERM/LicensesToolbar.vue | 2 +- > 5 files changed, 24 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 004d77dd4f0..5edac7bde9a 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 >@@ -264,7 +264,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 => {} > ) >@@ -272,7 +272,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/LicensesFormConfirmDelete.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormConfirmDelete.vue >index 0bf3dbfefa1..69ecfb6012f 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 >@@ -66,7 +66,7 @@ export default { > client.licenses.delete(this.license.license_id).then( > success => { > setMessage(this.$__("License deleted")) >- 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 84eb25bf441..b2c9b5b07ae 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 >@@ -59,13 +59,19 @@ 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) { >- 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 bf77b9f613e..d9c9bbd6d91 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,18 @@ > {{ $__("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 +139,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