File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script >
2- const OFFICES = {
3- BER : ' Berlin+Office+Floor+plan+-+BER' ,
4- LON : ' London+Office+Floor+plan+-+LON' ,
5- MTV : ' Mountain+View+Office+Floor+plans+-+MTV' ,
6- PAR : ' Paris+Office+Floor+plans+-+PAR' ,
7- PDX : ' Portland+Office+Floor+plan+-+PDX' ,
8- SF : ' San+Francisco+Office+Floor+plans+-+SFO' ,
9- TPE : ' Taipei+Office+Floor+plan+-+TPE' ,
10- TOR : ' Toronto+Office+Floor+plan-+TOR' ,
11- YVR : ' Vancouver+Office+Floor+plan+-+YVR' ,
12- };
2+ const OFFICES = [
3+ ' BER' ,
4+ ' PAR' ,
5+ ' PDX' ,
6+ ' SF' ,
7+ ' TOR' ,
8+ ];
139
1410export default {
1511 methods: {
1612 deskNumberToOfficePlanLink (deskNumber ) {
1713 if (typeof deskNumber === ' string' ) {
18- const name =
19- OFFICES [deskNumber .slice (0 , 3 )] || OFFICES [deskNumber .slice (0 , 2 )];
20- if (name) {
21- return ` https://mana.mozilla.org/wiki/display/WPR/${ name} ` ;
14+ if (OFFICES .some (office => deskNumber .startsWith (office))) {
15+ return ' https://mana.mozilla.org/wiki/display/WPR/MozSpaces+Floor+Plans' ;
2216 }
2317 }
2418 return null ;
You can’t perform that action at this time.
0 commit comments