diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue index c613a84836..4712cc5f3e 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue @@ -208,6 +208,12 @@ export default { }, table_url: function () { let url = "/api/v1/erm/agreements" + if (this.filters.by_expired) { + if (!this.filters.max_expiration_date) + this.filters.max_expiration_date = new Date() + .toISOString() + .substring(0, 10) + } if (this.filters.by_expired) url += "?max_expiration_date=" + this.filters.max_expiration_date @@ -221,12 +227,6 @@ export default { ) this.$router.push(new_route) } - if (this.filters.by_expired) { - if (!this.filters.max_expiration_date) - this.filters.max_expiration_date = new Date() - .toISOString() - .substring(0, 10) - } this.$refs.table.redraw(this.table_url()) }, getTableColumns: function () {