Skip to content

Commit e61bf09

Browse files
committed
BE+FE: refactor timezone UTC additional work #1506
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
1 parent 64dbf8a commit e61bf09

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

front/report.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'php/templates/header.php';
44
require 'php/templates/modals.php';
5-
5+
66
?>
77

88
<script>
@@ -14,7 +14,7 @@
1414

1515
<!-- Content header--------------------------------------------------------- -->
1616
<!-- Main content ---------------------------------------------------------- -->
17-
<section class="content tab-content">
17+
<section class="content tab-content">
1818

1919
<div class="box box-gray col-xs-12" >
2020
<div class="box-header">
@@ -45,7 +45,7 @@
4545
<select id="formatSelect" class="pointer">
4646
<option value="HTML">HTML</option>
4747
<option value="JSON">JSON</option>
48-
<option value="Text">Text</option>
48+
<option value="Text">Text</option>
4949
</select>
5050
</div>
5151

@@ -80,7 +80,7 @@
8080
const prevButton = document.getElementById('prevButton');
8181
const nextButton = document.getElementById('nextButton');
8282
const formatSelect = document.getElementById('formatSelect');
83-
83+
8484
let currentIndex = -1; // Current report index
8585

8686
// Function to update the displayed data and timestamp based on the selected format and index
@@ -115,7 +115,7 @@ function updateData(format, index) {
115115

116116
// console.log(notification)
117117

118-
timestamp.textContent = notification.DateTimeCreated;
118+
timestamp.textContent = localizeTimestamp(notification.DateTimeCreated);
119119
notiGuid.textContent = notification.GUID;
120120
currentIndex = index;
121121

@@ -161,17 +161,17 @@ function findIndexByGUID(data, guid) {
161161
console.log(index)
162162

163163
if (index == -1) {
164-
showModalOk('WARNING', `${getString("report_guid_missing")} <br/> <br/> <code>${guid}</code>`)
164+
showModalOk('WARNING', `${getString("report_guid_missing")} <br/> <br/> <code>${guid}</code>`)
165165
}
166166

167167
// Load the notification with the specified GUID
168168
updateData(formatSelect.value, index);
169-
169+
170170
})
171171
.catch(error => {
172172
console.error('Error:', error);
173173
});
174-
} else {
174+
} else {
175175

176176
// Initial data load
177177
updateData('HTML', -1); // Default format to HTML and load the latest report

0 commit comments

Comments
 (0)