use sessionStorage & add user admin pages

This commit is contained in:
2024-08-23 13:55:21 +02:00
parent 0e7b9d8c20
commit 1971169e2f
9 changed files with 66 additions and 10 deletions

View File

@ -36,8 +36,8 @@ export function showTable(api, ps, cp) {
newCell.innerHTML = `<a href="#!">Order ${i.id}</a>`;
newCell.addEventListener("click", function (evt) {
// put the current_page into localStorage
localStorage.setItem("cur-page", data.current_page);
// put the current_page into sessionStorage
sessionStorage.setItem("cur-page", data.current_page);
// redirect
location.href = `/admin/sales/${i.id}`;

View File

@ -34,8 +34,8 @@ export function showTable(api, ps, cp) {
newCell.innerHTML = `<a href="#!">Order ${i.id}</a>`;
newCell.addEventListener("click", function (evt) {
// put the current_page into localStorage
localStorage.setItem("cur-page", data.current_page);
// put the current_page into sessionStorage
sessionStorage.setItem("cur-page", data.current_page);
// redirect
location.href = `/admin/subscriptions/${i.id}`;