@@ -108,7 +108,12 @@ async function refreshCallCenterDefs(_app) {
108
108
while ( currentCallCenterIndex < numCallCenters ) {
109
109
currentCallCenterPrefix = _app . callCenterDefs [ currentCallCenterIndex ] . display_name ;
110
110
currentCallCenterRun = 1 ;
111
-
111
+
112
+ // as of 10/29, the election day call centers are of the form "ED " + <State> + " <Letter><Number>"
113
+ // in this case, use "ED " + <State> as the prefix to match a run against
114
+ let prefixMatch = currentCallCenterPrefix . match ( new RegExp ( "(ED .+) ([A-Z][0-9]*)" ) ) ;
115
+ if ( prefixMatch && prefixMatch . length > 1 ) currentCallCenterPrefix = prefixMatch [ 1 ] ;
116
+
112
117
if ( ! _app . denylistedShiftPrefixes . includes ( currentCallCenterPrefix ) ) {
113
118
while ( currentCallCenterRun + currentCallCenterIndex < numCallCenters ) {
114
119
// as of 10/26 we now have call centers named <State>, <State Letter>, and <State LetterNumber>
@@ -169,8 +174,8 @@ const app = new Vue({
169
174
headers : [ ] ,
170
175
callCenterDefs : [ ] ,
171
176
checkedCallCenterIds : [ ] ,
172
- shiftSuffixes : [ "A" , "B" , "C" , "D" , "E" , "F" ] ,
173
- denylistedShiftPrefixes : [ "National Spanish" ] ,
177
+ shiftSuffixes : [ "A" , "B" , "C" , "D" , "E" , "F" , "A1" , "A2" , "A3" , "B1" , "B2" , "B3" , "C1" , "C2" , "C3" ] ,
178
+ denylistedShiftPrefixes : [ "National Spanish" , "ED Spanish" ] ,
174
179
shiftCallCenterDefsBySuffix : [ ] ,
175
180
isAssigning : false ,
176
181
hasAssigned : false ,
@@ -213,14 +218,21 @@ const app = new Vue({
213
218
this . checkedCallCenterIds = [ ...this . userData . call_center_ids ] ;
214
219
} ,
215
220
displayNameForCallCenterName : function ( callCenterName ) {
216
- const shiftDisplayTimes = [ "(6am ET)" , "(9am ET)" , "(12pm ET)" , "(3pm ET)" , "(6pm ET)" , "(9pm ET)" ] ;
221
+ const shiftDisplayTimes = [ "(6am ET)" , "(9am ET)" , "(12pm ET)" , "(3pm ET)" , "(6pm ET)" , "(9pm ET)" , "(ED 5am ET)" , "(ED 5am ET)" , "(ED 5am ET)" , "(ED 11am ET)" , "(ED 11am ET)" , "(ED 11am ET)" , "(ED 5pm ET)" , "(ED 5pm ET)" , "(ED 5pm ET)" ] ;
222
+ const EDShiftDisplayTimes = [ "(ED 5am ET)" , "(ED 11am ET)" , "(ED 5pm ET)" ] ;
223
+ const EDPrefix = "ED " ;
217
224
218
225
// special case denylisted shift call centers that are at 6am because they don't have the A suffix
219
226
if ( this . denylistedShiftPrefixes . includes ( callCenterName ) ) return callCenterName + " " + shiftDisplayTimes [ 0 ] ;
220
227
221
228
for ( let shiftIndex = 0 ; shiftIndex < this . shiftSuffixes . length ; shiftIndex ++ ) {
222
229
if ( callCenterName . endsWith ( " " + this . shiftSuffixes [ shiftIndex ] ) ) {
223
- return callCenterName + " " + shiftDisplayTimes [ shiftIndex ] ;
230
+ if ( callCenterName . startsWith ( EDPrefix ) && shiftIndex < 3 ) {
231
+ // Spanish call centers have the format ED Spanish <Letter> so they don't have an ED-specific suffix
232
+ return callCenterName + " " + EDShiftDisplayTimes [ shiftIndex ] ;
233
+ } else {
234
+ return callCenterName + " " + shiftDisplayTimes [ shiftIndex ] ;
235
+ }
224
236
}
225
237
}
226
238
return callCenterName ;
0 commit comments