Skip to content

Commit b9fe480

Browse files
authored
Merge pull request #668 from caugner/update-offices-mixin
chore(OfficesMixin): update offices + floor plan link
2 parents f7cc62c + 0302191 commit b9fe480

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

src/components/_mixins/OfficesMixin.vue

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
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
1410
export 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;

0 commit comments

Comments
 (0)