diff --git a/src/main/resources/templates/reporting/po-jobcard-items-table.html b/src/main/resources/templates/reporting/po-jobcard-items-table.html
index 78fa7a8..6f3bf55 100644
--- a/src/main/resources/templates/reporting/po-jobcard-items-table.html
+++ b/src/main/resources/templates/reporting/po-jobcard-items-table.html
@@ -8,7 +8,7 @@
-
+
Sku |
diff --git a/src/main/resources/templates/reporting/po-report.html b/src/main/resources/templates/reporting/po-report.html
index 801d47c..2652971 100644
--- a/src/main/resources/templates/reporting/po-report.html
+++ b/src/main/resources/templates/reporting/po-report.html
@@ -11,7 +11,7 @@
All PO's
+ class="table table-striped font-sm" data-order="[[ 0, "desc" ]]" style="min-width: 1500px;">
PO Number |
@@ -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('Error loading data').show();
+ }
}
});
}
diff --git a/src/main/resources/templates/reporting/po-store-items-table.html b/src/main/resources/templates/reporting/po-store-items-table.html
index c8a180d..2e72a07 100644
--- a/src/main/resources/templates/reporting/po-store-items-table.html
+++ b/src/main/resources/templates/reporting/po-store-items-table.html
@@ -8,7 +8,7 @@