Skip to content
Snippets Groups Projects

Add feedback reminder after request is finished

Files

@@ -25,7 +25,6 @@ function handleSocketCreation(client) {
client.subscribe(`/user/topic/lab/${labId}/position`, msg => {
const event = JSON.parse(msg.body);
console.log(event);
if (event["type"] === "position-update") {
$("#position").text(event["position"]);
} else if (event["type"] === "request-taken") {
@@ -33,7 +32,9 @@ function handleSocketCreation(client) {
new Notification("You are in front of the Queue");
toast("You are in front of the queue", "info");
} else if (event["type"] === "request-finished") {
window.location.reload();
const url = new URL(window.location.href);
url.searchParams.set("requestFinished", event.id);
window.location = url.toString();
}
});
}
Loading