Skip to content

Commit f1f3452

Browse files
authored
feat(bus): option to mark bus as delayed
closes #1414
1 parent ebe30b4 commit f1f3452

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

intranet/static/js/bus-afternoon.js

+1-26
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,6 @@ $(function() {
9898
.filter(bus => bus.attributes.route_name.includes('JT'))
9999
.map(bus => bus.attributes);
100100
} else if (action === 'Mark a bus as arrived or on time') {
101-
<<<<<<< HEAD
102-
busList = routeList.filter(bus => !bus.attributes.route_name.includes('JT'))
103-
.map(bus => {
104-
if (bus.attributes.status === 'a') {
105-
// TODO: less hacky deep copy
106-
let attr = JSON.parse(JSON.stringify(bus.attributes));
107-
attr.route_name = `Mark ${bus.attributes.route_name} as on time`;
108-
return attr;
109-
} else {
110-
return bus.attributes;
111-
}
112-
});
113-
=======
114101
busList = routeList.map(bus => {
115102
if ((bus.attributes.status === 'a' || bus.attributes.status === 'd') && !bus.attributes.route_name.includes('JT')) {
116103
let attr = JSON.parse(JSON.stringify(bus.attributes));
@@ -135,7 +122,6 @@ $(function() {
135122

136123
}
137124
}).flat().filter((element) => element != null);
138-
>>>>>>> 45142c57 (feat(bus): option to mark bus as delayed)
139125
} else if (action === 'Assign a bus to this space') {
140126
busList = routeList.filter(bus => bus.attributes.status !== 'a')
141127
.map(bus => bus.attributes);
@@ -193,16 +179,6 @@ $(function() {
193179
} else if (this.action === 'Mark a bus as arrived or on time') {
194180
let route_name = '';
195181
let st = '';
196-
<<<<<<< HEAD
197-
// TODO: this is also super hacky
198-
// Essentially, this checks if the selected route has "Mark"
199-
// at the beginning, implying that it's to be marked on time.
200-
if (e.target.value.indexOf('Mark') === 0) {
201-
route_name = e.target.value.split(' ')[1];
202-
st = 'o';
203-
} else {
204-
route_name = e.target.value;
205-
=======
206182
if (e.target.value.includes('on')) {
207183
route_name = e.target.value.split(' ')[1];
208184

@@ -215,7 +191,6 @@ $(function() {
215191
}
216192
else {
217193
route_name = e.target.value.split(' ')[1];
218-
>>>>>>> 45142c57 (feat(bus): option to mark bus as delayed)
219194
st = 'a';
220195
}
221196
let route = this.model.findWhere({route_name: route_name}).attributes;
@@ -796,4 +771,4 @@ $(function() {
796771
});
797772
}, 1000);
798773
});
799-
*/
774+
*/

0 commit comments

Comments
 (0)