mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fixed broken home page notices
This commit is contained in:
+3
-2
@@ -2278,7 +2278,7 @@ async function loadHomePage() {
|
|||||||
|
|
||||||
// Formats the current date used send a request for timetable and notices later
|
// Formats the current date used send a request for timetable and notices later
|
||||||
const TodayFormatted =
|
const TodayFormatted =
|
||||||
date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() < 10 ? '0' : '') + date.getDate()
|
date.getFullYear() + '-' + ((date.getMonth() + 1) < 10 ? '0' : '') + (date.getMonth() + 1) + '-' + (date.getDate() < 10 ? '0' : '') + date.getDate()
|
||||||
|
|
||||||
callHomeTimetable(TodayFormatted, true)
|
callHomeTimetable(TodayFormatted, true)
|
||||||
|
|
||||||
@@ -2490,7 +2490,8 @@ async function loadHomePage() {
|
|||||||
}
|
}
|
||||||
// Data sent as the POST request
|
// Data sent as the POST request
|
||||||
const dateControl = document.querySelector('input[type="date"]') as HTMLInputElement
|
const dateControl = document.querySelector('input[type="date"]') as HTMLInputElement
|
||||||
xhr2.send(JSON.stringify({ date: dateControl!.value }))
|
console.log(dateControl.value)
|
||||||
|
xhr2.send(JSON.stringify({ date: dateControl.value }))
|
||||||
function onInputChange (e: any) {
|
function onInputChange (e: any) {
|
||||||
xhr2.open('POST', `${location.origin}/seqta/student/load/notices?`, true)
|
xhr2.open('POST', `${location.origin}/seqta/student/load/notices?`, true)
|
||||||
xhr2.setRequestHeader('Content-Type', 'application/json; charset=utf-8')
|
xhr2.setRequestHeader('Content-Type', 'application/json; charset=utf-8')
|
||||||
|
|||||||
Reference in New Issue
Block a user