add logic when session expire redirect to login page
parent
59b572d691
commit
b728efd305
|
@ -8,7 +8,7 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<table th:if="${#lists != null && #lists.size(poJobcardItems.keySet()) != 0 }" class="table table-bordered font-sm mb-4" data-dropdown-icon-summary >
|
||||
<table th:if="${#lists != null && #lists.size(poJobcardItems.keySet()) != 0 }" class="table table-bordered font-sm mb-4" data-order="[[ 0, "desc" ]]" data-dropdown-icon-summary >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sku</th>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<h3>All PO's</h3>
|
||||
<div class="table-responsive"> <!-- Bootstrap responsive table wrapper -->
|
||||
<table th:if="${ #lists != null && #lists.size(allPOs) != 0 }"
|
||||
class="table table-striped font-sm" style="min-width: 1500px;">
|
||||
class="table table-striped font-sm" data-order="[[ 0, "desc" ]]" style="min-width: 1500px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>PO Number</th>
|
||||
|
@ -299,8 +299,21 @@
|
|||
$.ajax({
|
||||
url: `/ctp/po-status/po-items?poId=${poId}&size=${size}&color=${color}`,
|
||||
success: function( data ){
|
||||
// show fetched page
|
||||
$row.child( data ).show();
|
||||
if (data.includes('page-login') ||
|
||||
data.includes('login__form') ||
|
||||
data.includes('Sign in')) {
|
||||
// Redirect to login page
|
||||
window.location.href = '/ctp/login?logout';
|
||||
} else {
|
||||
$row.child(data).show();
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
if (xhr.status === 401) {
|
||||
window.location.href = '/ctp/login?logout';
|
||||
} else {
|
||||
$row.child('<span class="text-danger">Error loading data</span>').show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<table th:if="${#lists != null && #lists.size(storeItems.keySet()) != 0 }" class="table table-bordered font-sm mb-4" data-account-tables >
|
||||
<table th:if="${#lists != null && #lists.size(storeItems.keySet()) != 0 }" class="table table-bordered font-sm mb-4" data-order="[[ 0, "desc" ]]" data-account-tables >
|
||||
<thead>
|
||||
<tr>
|
||||
<th th:each="heading : ${storeItems.keySet()}" th:text="${heading}"></th>
|
||||
|
|
Loading…
Reference in New Issue