Compare commits
4 Commits
5072d473bb
...
b61851e122
Author | SHA1 | Date |
---|---|---|
Fred Boniface | b61851e122 | |
Fred Boniface | c1a5ce1fe9 | |
Fred Boniface | c7ea029c11 | |
Fred Boniface | ac24cb571e |
|
@ -54,15 +54,16 @@
|
||||||
<h1>Register for OwlBoard</h1>
|
<h1>Register for OwlBoard</h1>
|
||||||
<br />
|
<br />
|
||||||
<p>
|
<p>
|
||||||
Use the link below or scan the barcode to register for OwlBoard
|
Tap the button to register this device, or scan the barcode with another device.
|
||||||
(Staff Version)
|
|
||||||
</p>
|
</p>
|
||||||
<br />
|
<br />
|
||||||
<a
|
<a
|
||||||
href="https://owlboard.info/more/reg/submit?key=>>ACCESSCODE<<"
|
href="https://owlboard.info/more/reg/submit?key=>>ACCESSCODE<<"
|
||||||
id="button"
|
id="button"
|
||||||
>Register</a
|
>Register this device</a
|
||||||
>
|
>
|
||||||
|
<br /><br /><br />
|
||||||
|
<p>Or scan with the device you want to register</p>
|
||||||
<br />
|
<br />
|
||||||
<img
|
<img
|
||||||
src="https://barcodes.fjla.uk/generate?type=aztec&text=https%3A%2F%2Fowlboard.info%2Fmore%2Freg%2Fsubmit%3Fkey%3D>>ACCESSCODE<<"
|
src="https://barcodes.fjla.uk/generate?type=aztec&text=https%3A%2F%2Fowlboard.info%2Fmore%2Freg%2Fsubmit%3Fkey%3D>>ACCESSCODE<<"
|
||||||
|
|
|
@ -24,8 +24,9 @@ async function query(collection, query, returnId = false) {
|
||||||
log.out(`dbAccess.query: Running Query: ${JSON.stringify(query)}`, "info");
|
log.out(`dbAccess.query: Running Query: ${JSON.stringify(query)}`, "info");
|
||||||
increment(collection);
|
increment(collection);
|
||||||
log.out("dbAccess.query: Query response:");
|
log.out("dbAccess.query: Query response:");
|
||||||
console.log(await qcursor.toArray());
|
let result = await qcursor.toArray();
|
||||||
return await qcursor.toArray();
|
console.log(result);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function queryProject(collection, query, projection) {
|
async function queryProject(collection, query, projection) {
|
||||||
|
|
|
@ -34,10 +34,15 @@ export function transform(input: any): StaffLdb | null {
|
||||||
}
|
}
|
||||||
|
|
||||||
function transformDateTime(input: string): Date {
|
function transformDateTime(input: string): Date {
|
||||||
|
console.log("Transform Date Time Running")
|
||||||
return new Date(input);
|
return new Date(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
function transformNrcc(input: any): NrccMessage[] | undefined {
|
function transformNrcc(input: any): NrccMessage[] | undefined {
|
||||||
|
console.log("Transform Nrcc Running")
|
||||||
|
if (input === undefined) {
|
||||||
|
return input
|
||||||
|
}
|
||||||
let output: NrccMessage[] = [];
|
let output: NrccMessage[] = [];
|
||||||
let messages = input;
|
let messages = input;
|
||||||
if (!Array.isArray(input?.message)) {
|
if (!Array.isArray(input?.message)) {
|
||||||
|
@ -57,6 +62,7 @@ function transformNrcc(input: any): NrccMessage[] | undefined {
|
||||||
}
|
}
|
||||||
|
|
||||||
function transformTrainServices(input: any): TrainServices[] {
|
function transformTrainServices(input: any): TrainServices[] {
|
||||||
|
console.log("Transform Train Services Running")
|
||||||
let services: any = input?.service;
|
let services: any = input?.service;
|
||||||
let output: TrainServices[] = [];
|
let output: TrainServices[] = [];
|
||||||
if (services === undefined) {
|
if (services === undefined) {
|
||||||
|
@ -98,6 +104,7 @@ function transformTrainServices(input: any): TrainServices[] {
|
||||||
}
|
}
|
||||||
|
|
||||||
function transformLocation(input: any): ServiceLocation[] {
|
function transformLocation(input: any): ServiceLocation[] {
|
||||||
|
console.log("Transform Location Running")
|
||||||
let output: ServiceLocation[] = [];
|
let output: ServiceLocation[] = [];
|
||||||
let locations: any[] = input.location;
|
let locations: any[] = input.location;
|
||||||
if (!Array.isArray(input.location)) {
|
if (!Array.isArray(input.location)) {
|
||||||
|
@ -116,6 +123,7 @@ function transformLocation(input: any): ServiceLocation[] {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function calculateLength(input: any): number | undefined {
|
export function calculateLength(input: any): number | undefined {
|
||||||
|
console.log("Calculate Length Running")
|
||||||
let length: number;
|
let length: number;
|
||||||
if (input?.length) {
|
if (input?.length) {
|
||||||
length = input.length;
|
length = input.length;
|
||||||
|
@ -129,6 +137,7 @@ export function calculateLength(input: any): number | undefined {
|
||||||
}
|
}
|
||||||
|
|
||||||
function transformUnspecifiedDateTime(input: string): Date | undefined {
|
function transformUnspecifiedDateTime(input: string): Date | undefined {
|
||||||
|
console.log("Transform Unspecified Date Time Running")
|
||||||
if (!input) {
|
if (!input) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,4 +53,51 @@ export const inputs: any[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
GetBoardResult: {
|
||||||
|
generatedAt: "2023-08-01T20:37:05.559123+01:00",
|
||||||
|
locationName: "Railway Station",
|
||||||
|
crs: "RLY",
|
||||||
|
stationManager: "Network Rail",
|
||||||
|
stationManagerCode: "RT",
|
||||||
|
isTruncated: "true",
|
||||||
|
trainServices: {
|
||||||
|
service: [
|
||||||
|
{
|
||||||
|
rid: "202308017159276",
|
||||||
|
uid: "G59276",
|
||||||
|
trainid: "1M83",
|
||||||
|
sdd: "2023-08-01",
|
||||||
|
operator: "CrossCountry",
|
||||||
|
operatorCode: "XC",
|
||||||
|
sta: "2023-08-01T20:24:00",
|
||||||
|
ata: "2023-08-01T20:27:22",
|
||||||
|
arrivalType: "Actual",
|
||||||
|
std: "2023-08-01T20:35:00",
|
||||||
|
etd: "2023-08-01T20:35:00",
|
||||||
|
departureType: "Estimated",
|
||||||
|
departureSource: "Darwin",
|
||||||
|
platform: "5",
|
||||||
|
length: "10",
|
||||||
|
origin: {
|
||||||
|
location: {
|
||||||
|
locationName: "Plymouth",
|
||||||
|
crs: "PLY",
|
||||||
|
tiploc: "PLYMTH",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
location: {
|
||||||
|
locationName: "Birmingham New Street",
|
||||||
|
crs: "BHM",
|
||||||
|
tiploc: "BHAMNWS",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
category: "XX",
|
||||||
|
activities: "T",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -45,4 +45,37 @@ export const outputs: StaffLdb[] = [
|
||||||
busServices: [],
|
busServices: [],
|
||||||
ferryServices: [],
|
ferryServices: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
generatedAt: expect.any(Date),
|
||||||
|
locationName: "Railway Station",
|
||||||
|
stationManagerCode: "RT",
|
||||||
|
trainServices: [
|
||||||
|
{
|
||||||
|
rid: "202308017159276",
|
||||||
|
uid: "G59276",
|
||||||
|
trainid: "1M83",
|
||||||
|
operatorCode: "XC",
|
||||||
|
sta: expect.any(Date),
|
||||||
|
ata: expect.any(Date),
|
||||||
|
arrivalType: "Actual",
|
||||||
|
std: expect.any(Date),
|
||||||
|
etd: expect.any(Date),
|
||||||
|
departureType: "Estimated",
|
||||||
|
platform: "5",
|
||||||
|
length: 10,
|
||||||
|
origin: [
|
||||||
|
{
|
||||||
|
tiploc: "PLYMTH",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
destination: [
|
||||||
|
{
|
||||||
|
tiploc: "BHAMNWS",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
busServices: [],
|
||||||
|
ferryServices: [],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue