From 48e5c2505ce15b33c8d23ee728e3a2e30f4863fc Mon Sep 17 00:00:00 2001
From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Date: Tue, 1 Oct 2024 11:20:33 +0000
Subject: [PATCH] Bug 38010: Rebase for Button component change

---
 .../js/vue/components/Vendors/VendorDetails.vue    |  7 ++++---
 .../js/vue/components/Vendors/VendorInterfaces.vue |  7 ++++---
 .../prog/js/vue/components/Vendors/VendorList.vue  |  6 +++---
 .../prog/js/vue/components/Vendors/VendorShow.vue  | 14 +++++++-------
 4 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorDetails.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorDetails.vue
index 43e15e4ec3a..16180944b36 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorDetails.vue
+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorDetails.vue
@@ -45,12 +45,13 @@
             </li>
             <li v-if="vendor.url" id="vendorWebsite">
                 <label>{{ $__("Website") }}:</label>
-                <ExternalLinkButton
+                <ButtonLink
                     :to="{
                         path: vendor.url,
                     }"
                     class=""
                     :title="vendor.url"
+                    callback="redirect"
                 />
             </li>
             <li v-if="vendor.accountnumber">
@@ -167,7 +168,7 @@
 <script>
 import { inject } from "vue"
 import { storeToRefs } from "pinia"
-import ExternalLinkButton from "../ExternalLinkButton.vue"
+import ButtonLink from "../ButtonLink.vue"
 
 export default {
     props: {
@@ -201,7 +202,7 @@ export default {
         },
     },
     components: {
-        ExternalLinkButton,
+        ButtonLink,
     },
 }
 </script>
diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorInterfaces.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorInterfaces.vue
index a902b3c8d60..18d340116be 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorInterfaces.vue
+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorInterfaces.vue
@@ -13,12 +13,13 @@
             </li>
             <li v-if="vi.uri">
                 <label>{{ $__("URI") }}:</label>
-                <ExternalLinkButton
+                <ButtonLink
                     :to="{
                         path: vi.uri,
                     }"
                     class=""
                     :title="vi.uri"
+                    callback="redirect"
                 />
             </li>
             <li v-if="vi.login">
@@ -141,7 +142,7 @@
 <script>
 import { inject } from "vue"
 import { storeToRefs } from "pinia"
-import ExternalLinkButton from "../ExternalLinkButton.vue"
+import ButtonLink from "../ButtonLink.vue"
 
 export default {
     props: {
@@ -173,7 +174,7 @@ export default {
         },
     },
     components: {
-        ExternalLinkButton,
+        ButtonLink,
     },
 }
 </script>
diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue
index 530a99ebb14..586732479d7 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue
+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue
@@ -2,7 +2,7 @@
     <div v-if="!initialized">{{ $__("Loading") }}</div>
     <div v-else id="vendors_list">
         <Toolbar>
-            <ToolbarButton
+            <ButtonLink
                 :to="{ name: 'VendorFormAdd' }"
                 icon="plus"
                 :title="$__('New vendor')"
@@ -27,7 +27,7 @@
 <script>
 import flatPickr from "vue-flatpickr-component"
 import Toolbar from "../Toolbar.vue"
-import ToolbarButton from "../ToolbarButton.vue"
+import ButtonLink from "../ButtonLink.vue"
 import { inject, ref } from "vue"
 import { APIClient } from "../../fetch/api-client.js"
 import { storeToRefs } from "pinia"
@@ -248,7 +248,7 @@ export default {
             ]
         },
     },
-    components: { flatPickr, Toolbar, ToolbarButton, KohaTable },
+    components: { flatPickr, Toolbar, ButtonLink, KohaTable },
     name: "VendorList",
     emits: ["select-vendor", "close"],
 }
diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue
index 10ffd182e60..0e3e39c5095 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue
+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue
@@ -2,12 +2,12 @@
     <div v-if="!initialized">{{ $__("Loading") }}</div>
     <div v-else id="vendors_show">
         <Toolbar>
-            <ToolbarButton
+            <ButtonLink
                 :to="{ name: 'VendorFormAdd' }"
                 icon="plus"
                 :title="$__('New vendor')"
             />
-            <ToolbarButton
+            <ButtonLink
                 :to="{
                     name: 'VendorFormAddEdit',
                     params: { vendor_id: vendor.id },
@@ -15,13 +15,14 @@
                 icon="pencil"
                 :title="$__('Edit vendor')"
             />
-            <ExternalLinkButton
+            <ButtonLink
                 :to="{
                     path: '/cgi-bin/koha/acqui/parcels.pl',
                     query: { booksellerid: vendor.id },
                 }"
                 icon="plus"
                 :title="$__('Receive shipments')"
+                callback="redirect"
             />
         </Toolbar>
         <h1>
@@ -53,10 +54,10 @@
 
 <script>
 import Toolbar from "../Toolbar.vue"
-import ToolbarButton from "../ToolbarButton.vue"
+import Button from "../Button.vue"
 import { inject } from "vue"
 import { APIClient } from "../../fetch/api-client.js"
-import ExternalLinkButton from "../ExternalLinkButton.vue"
+import ButtonLink from "../ButtonLink.vue"
 import VendorDetails from "./VendorDetails.vue"
 import VendorOrderingInformation from "./VendorOrderingInformation.vue"
 import VendorInterfaces from "./VendorInterfaces.vue"
@@ -103,8 +104,7 @@ export default {
     },
     components: {
         Toolbar,
-        ToolbarButton,
-        ExternalLinkButton,
+        ButtonLink,
         VendorDetails,
         VendorOrderingInformation,
         VendorInterfaces,
-- 
2.39.3 (Apple Git-146)