View | Details | Raw Unified | Return to bug 33490
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue (+6 lines)
Lines 217-222 export default { Link Here
217
        },
217
        },
218
        filter_table: async function () {
218
        filter_table: async function () {
219
            if (this.before_route_entered) {
219
            if (this.before_route_entered) {
220
                if (this.filters.by_expired) {
221
                    if (!this.filters.max_expiration_date)
222
                        this.filters.max_expiration_date = new Date()
223
                            .toISOString()
224
                            .substring(0, 10)
225
                }
220
                let new_route = build_url(
226
                let new_route = build_url(
221
                    "/cgi-bin/koha/erm/agreements",
227
                    "/cgi-bin/koha/erm/agreements",
222
                    this.filters
228
                    this.filters
(-)a/t/cypress/integration/Agreements_spec.ts (-2 / +1 lines)
Lines 177-183 describe("Agreement CRUD operations", () => { Link Here
177
            .its('request.url')
177
            .its('request.url')
178
            .should('include', 'max_expiration_date='+dates["today_iso"]); // Defaults to today
178
            .should('include', 'max_expiration_date='+dates["today_iso"]); // Defaults to today
179
        cy.get("#max_expiration_date_filter").should("have.value", dates["today_iso"]); // Input box reflects default
179
        cy.get("#max_expiration_date_filter").should("have.value", dates["today_iso"]); // Input box reflects default
180
        cy.url().should('include', "/cgi-bin/koha/erm/agreements?by_expired=true"); // Browser url also updated
180
        cy.url().should('include', "/cgi-bin/koha/erm/agreements?by_expired=true&max_expiration_date="+dates["today_iso"]); // Browser url also updated
181
181
182
        // Now test that the url for this particular state works
182
        // Now test that the url for this particular state works
183
        cy.visit("/cgi-bin/koha/erm/agreements?by_expired=true");
183
        cy.visit("/cgi-bin/koha/erm/agreements?by_expired=true");
184
- 

Return to bug 33490