Skip to content

Commit

Permalink
feat(bus): mark a bus as delayed in afternoon menu
Browse files Browse the repository at this point in the history
closes tjcsl#1414

feat(bus): option to mark bus as delayed

closes tjcsl#1414

feat(bus): mark a bus as delayed in afternoon menu

closes tjcsl#1414
  • Loading branch information
IshanA2007 committed May 14, 2023
1 parent 443647a commit 1a323e3
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions intranet/static/js/bus-afternoon.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ $(function () {
.map(bus => bus.attributes);
} else if (action === 'Mark a bus as arrived or on time') {
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 443647ab (feat(bus): option to mark bus as delayed)
busList = routeList.map(bus => {
if ((bus.attributes.status === 'a' || bus.attributes.status === 'd') && !bus.attributes.route_name.includes('JT')) {
let attr = JSON.parse(JSON.stringify(bus.attributes));
Expand All @@ -124,6 +128,11 @@ $(function () {
}
}).flat().filter((element) => element != null);
=======
<<<<<<< HEAD
=======
>>>>>>> dcacb3b1 (feat(bus): mark a bus as delayed in afternoon menu)
=======
>>>>>>> 443647ab (feat(bus): option to mark bus as delayed)
busList = routeList.filter(bus => bus.attributes.route_name.includes(''))
.map(bus => {
if (bus.attributes.status === 'a' || bus.attributes.status === 'd') {
Expand All @@ -144,6 +153,12 @@ $(function () {
return bus.attributes;
}
}).flat();
<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> dcacb3b1 (feat(bus): mark a bus as delayed in afternoon menu)
=======
=======
>>>>>>> 443647ab (feat(bus): option to mark bus as delayed)
>>>>>>> dcacb3b1 (feat(bus): mark a bus as delayed in afternoon menu)
} else if (action === 'Assign a bus to this space') {
busList = routeList.filter(bus => bus.attributes.status !== 'a')
Expand Down Expand Up @@ -205,18 +220,33 @@ $(function () {
if (e.target.value.includes('on time')) {
route_name = e.target.value.split(' ')[1];
alert(route_name);
<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> dcacb3b1 (feat(bus): mark a bus as delayed in afternoon menu)
=======
=======
>>>>>>> 443647ab (feat(bus): option to mark bus as delayed)
>>>>>>> dcacb3b1 (feat(bus): mark a bus as delayed in afternoon menu)
st = 'o';
}
else if (e.target.value.includes('delayed')) {
route_name = e.target.value.split(' ')[1];
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 443647ab (feat(bus): option to mark bus as delayed)

st = 'd';
}
else {
route_name = e.target.value.split(' ')[1];
=======
<<<<<<< HEAD
=======
>>>>>>> dcacb3b1 (feat(bus): mark a bus as delayed in afternoon menu)
=======
>>>>>>> 443647ab (feat(bus): option to mark bus as delayed)
alert(route_name);
st = 'd';
}
Expand Down

0 comments on commit 1a323e3

Please sign in to comment.