@@ -98,19 +98,6 @@ $(function() {
98
98
. filter ( bus => bus . attributes . route_name . includes ( 'JT' ) )
99
99
. map ( bus => bus . attributes ) ;
100
100
} 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
- = === ===
114
101
busList = routeList . map ( bus => {
115
102
if ( ( bus . attributes . status === 'a' || bus . attributes . status === 'd' ) && ! bus . attributes . route_name . includes ( 'JT' ) ) {
116
103
let attr = JSON . parse ( JSON . stringify ( bus . attributes ) ) ;
@@ -135,7 +122,6 @@ $(function() {
135
122
136
123
}
137
124
} ) . flat ( ) . filter ( ( element ) => element != null ) ;
138
- > >>> >>> 45142 c57 ( feat ( bus ) : option to mark bus as delayed )
139
125
} else if ( action === 'Assign a bus to this space' ) {
140
126
busList = routeList . filter ( bus => bus . attributes . status !== 'a' )
141
127
. map ( bus => bus . attributes ) ;
@@ -193,16 +179,6 @@ $(function() {
193
179
} else if ( this . action === 'Mark a bus as arrived or on time' ) {
194
180
let route_name = '' ;
195
181
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
- = === ===
206
182
if ( e . target . value . includes ( 'on' ) ) {
207
183
route_name = e . target . value . split ( ' ' ) [ 1 ] ;
208
184
@@ -215,7 +191,6 @@ $(function() {
215
191
}
216
192
else {
217
193
route_name = e . target . value . split ( ' ' ) [ 1 ] ;
218
- > >>> >>> 45142 c57 ( feat ( bus ) : option to mark bus as delayed )
219
194
st = 'a' ;
220
195
}
221
196
let route = this . model . findWhere ( { route_name : route_name } ) . attributes ;
@@ -796,4 +771,4 @@ $(function() {
796
771
});
797
772
}, 1000);
798
773
});
799
- */
774
+ */
0 commit comments