From df010635fc7eca4e489a2cf848cf9883576d6bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Tom=C3=A1s?= Date: Fri, 20 Apr 2018 16:48:24 +0200 Subject: [PATCH] Fix issue mvc refreshing order list --- src/Web/WebMVC/Views/Shared/_Layout.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Web/WebMVC/Views/Shared/_Layout.cshtml b/src/Web/WebMVC/Views/Shared/_Layout.cshtml index a5c472e20..5d616afaf 100644 --- a/src/Web/WebMVC/Views/Shared/_Layout.cshtml +++ b/src/Web/WebMVC/Views/Shared/_Layout.cshtml @@ -118,7 +118,7 @@ function registerNotificationHandlers(connection) { connection.on("UpdatedOrderState", (message) => { toastr.success('Updated to status: ' + message.status, 'Order Id: ' + message.orderId); - if (window.location.pathname === '/Order') { + if (window.location.pathname.split("/").pop() === 'Order') { refreshOrderList(); } }); @@ -132,7 +132,7 @@ clearTimeout(timerId); timerId = setTimeout(function () { window.location.reload(); - }, 5000); + }, 1000); }