Merge branch 'feature/save-amount-shown-per-page' into 'marietje-zuid'

Store page size on manage and request pages

Closes #51

See merge request technicie/MarietjeDjango!68
This commit is contained in:
2023-10-11 16:09:30 +02:00
4 changed files with 37 additions and 4 deletions

View File

@ -425,6 +425,7 @@
this.page_size = 10;
}
this.page_number = 1;
setCookie("REQUEST_PAGE_SIZE", this.page_size, 14);
this.search();
}
}
@ -455,6 +456,10 @@
tata.error("", "An unknown error occurred, please try again.")
}
});
const stored_page_size = parseInt(getCookie("REQUEST_PAGE_SIZE"));
if (stored_page_size !== Number.NaN && stored_page_size > 0) {
this.page_size = stored_page_size;
}
},
methods: {
search() {