Bug 33490: Prevent 400 on agreements?by_expired=true
We need to update the filter THEN update the current route
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 90ed8a26c5
)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
4b22dff729
commit
5bf3631a4a
1 changed files with 6 additions and 6 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue