Bug 38201: Fix delete resource from resourceShow

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Pedro Amorim 2025-01-29 11:49:30 +00:00 committed by Lucas Gass
parent 9a0a384361
commit c825932f2f
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 6 additions and 2 deletions

View File

@ -89,7 +89,7 @@ export default {
* @param {Object} callback - Callback to call after deletion (optional)
* @return {void}
*/
doResourceDelete: function (resource, callback, table) {
doResourceDelete: function (resource, callback) {
let resourceId = resource
? resource[this.idAttr]
: this[this.resourceName][this.idAttr];
@ -119,7 +119,11 @@ export default {
if (typeof callback === "function") {
callback();
} else {
callback.ajax.reload();
if (this.$props.action === "list") {
callback.ajax.reload();
} else {
this.goToResourceList();
}
}
},
error => {}