Browse Source

Fix issue mvc refreshing order list

pull/702/merge
Ramón Tomás 6 years ago
parent
commit
df010635fc
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Web/WebMVC/Views/Shared/_Layout.cshtml

+ 2
- 2
src/Web/WebMVC/Views/Shared/_Layout.cshtml View File

@ -118,7 +118,7 @@
function registerNotificationHandlers(connection) { function registerNotificationHandlers(connection) {
connection.on("UpdatedOrderState", (message) => { connection.on("UpdatedOrderState", (message) => {
toastr.success('Updated to status: ' + message.status, 'Order Id: ' + message.orderId); toastr.success('Updated to status: ' + message.status, 'Order Id: ' + message.orderId);
if (window.location.pathname === '/Order') {
if (window.location.pathname.split("/").pop() === 'Order') {
refreshOrderList(); refreshOrderList();
} }
}); });
@ -132,7 +132,7 @@
clearTimeout(timerId); clearTimeout(timerId);
timerId = setTimeout(function () { timerId = setTimeout(function () {
window.location.reload(); window.location.reload();
}, 5000);
}, 1000);
} }
</script> </script>
</body> </body>


Loading…
Cancel
Save