Finalise initial release of 'find by headcode', bump version
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* All Page Init */
|
||||
const version = '2023.5.10'
|
||||
const version = '2023.6.1'
|
||||
|
||||
/* Feature Detectors */
|
||||
|
||||
|
||||
10
js/pis.js
10
js/pis.js
@@ -23,6 +23,12 @@ async function findByOrigDest() {
|
||||
hideLoading()
|
||||
}
|
||||
|
||||
async function findByHeadcode() {
|
||||
showLoading()
|
||||
const formData = await fetchHeadcode()
|
||||
window.location.assign(`./train-detail.html?headcode=${formData}`)
|
||||
}
|
||||
|
||||
async function findByPisCode() {
|
||||
showLoading()
|
||||
const formData = await fetchPisCode()
|
||||
@@ -72,6 +78,10 @@ async function fetchPisCode() {
|
||||
return document.getElementById('pis').value
|
||||
}
|
||||
|
||||
async function fetchHeadcode() {
|
||||
return document.getElementById('headcode').value
|
||||
}
|
||||
|
||||
async function insertData(json) {
|
||||
// Receives the JSON Respose ([{},{}]) containing one or more possible
|
||||
// PIS codes. Display the code and the stops with a method of scrolling between them.
|
||||
|
||||
Reference in New Issue
Block a user