@@ -50,9 +50,9 @@ export default {
50
50
type: Object ,
51
51
required: true ,
52
52
},
53
- isFinalsCard : {
53
+ isFinalsTab : {
54
54
type: Boolean ,
55
- default : false ,
55
+ required : true ,
56
56
},
57
57
day: {
58
58
type: String ,
@@ -62,6 +62,10 @@ export default {
62
62
type: Object ,
63
63
required: true ,
64
64
},
65
+ meetingsWithoutTime: {
66
+ type: Boolean ,
67
+ required: false ,
68
+ },
65
69
},
66
70
computed: {
67
71
quarter () {
@@ -112,51 +116,77 @@ export default {
112
116
this .meetingData .section .course_number
113
117
} -${ this .meetingData .section .section_id } ` ;
114
118
},
115
- isOnline () {
116
- return (this .meetingData && this .meetingData .meeting &&
117
- this .meetingData .meeting .building_tbd &&
118
- (this .meetingData .section .is_asynchronous ||
119
- this .meetingData .section .is_synchronous ||
120
- this .meetingData .section .is_hybrid ) &&
121
- ! (this .meetingData .meeting .wont_meet ||
122
- this .meetingData .meeting .no_meeting ||
123
- this .meetingData .meeting .days_tbd )
119
+ isInPerson () { // MUWM-5099
120
+ return (
121
+ this .meetingData .section &&
122
+ ! (this .meetingData .section .is_asynchronous ||
123
+ this .meetingData .section .is_synchronous ||
124
+ this .meetingData .section .is_hybrid ));
125
+ },
126
+ wontMeet () {
127
+ return (
128
+ ! this .meetingData .meeting ||
129
+ this .meetingData .meeting .wont_meet
130
+ );
131
+ },
132
+ hasBuildingRoom () {
133
+ return (
134
+ this .meetingData .meeting &&
135
+ ' building' in this .meetingData .meeting && this .meetingData .meeting .building != ' *' &&
136
+ ' room' in this .meetingData .meeting && this .meetingData .meeting .room != ' *'
124
137
);
125
138
},
126
139
meetingLocation () {
127
- if (this .isOnline ) { // MUWM-5099
128
- return ' Online' ;
129
- }
130
- if (this .meetingData .meeting && this .meetingData .meeting .no_meeting ) {
131
- return ' No meeting' ;
140
+ if (this .meetingsWithoutTime || this .wontMeet ) {
141
+ // MUWM-5208
142
+ if (this .isFinalsTab ) {
143
+ return ' ' ;
144
+ }
145
+ if (! this .isInPerson ) {
146
+ return ' Online' ;
147
+ }
148
+ return ' ' ;
132
149
}
133
- if (! this .isRoomTBD () ) {
150
+ if (this .hasBuildingRoom ) {
134
151
return ` ${
135
152
this .meetingData .meeting .building
136
153
} ${ this .meetingData .meeting .room } ` ;
137
154
}
155
+ if (! this .isInPerson ) {
156
+ // MUWM-5208
157
+ if (! this .isFinalsTab ) {
158
+ return ' Online' ;
159
+ }
160
+ return ' TBD' ;
161
+ }
138
162
return ' Room TBD' ;
139
163
},
140
164
ariaMeetingLocation () {
141
- if (this .isOnline ) { // MUWM-5099
142
- return ' Online' ;
143
- }
144
- if (this .meetingData .meeting && this .meetingData .meeting .no_meeting ) {
165
+ if (this .meetingsWithoutTime || this .wontMeet ) {
166
+ // MUWM-5208
167
+ if (this .isFinalsTab ) {
168
+ return ' Location: None' ;
169
+ }
170
+ if (! this .isInPerson ) {
171
+ return ' Location: Online' ;
172
+ }
145
173
return ' Location: None' ;
146
174
}
147
- if (! this .isRoomTBD () ) {
148
- return ` Building: ${
175
+ if (this .hasBuildingRoom ) {
176
+ return ` ${
149
177
this .meetingData .meeting .building
150
- } Room: ${ this .meetingData .meeting .room } ` ;
178
+ } ${ this .meetingData .meeting .room } ` ;
179
+ }
180
+ if (! this .isInPerson && ! this .isFinalsTab ) {
181
+ // MUWM-5208
182
+ return ' Location: Online' ;
151
183
}
152
- return ' Location: Room TBD' ;
184
+ return ' Location: TBD' ;
153
185
},
154
186
meetingLocationUrl () {
155
- if (
156
- ! this .meetingData .section .is_remote &&
157
- ! this .isRoomTBD () &&
158
- ' latitude' in this .meetingData .meeting &&
159
- ' longitude' in this .meetingData .meeting
187
+ if (this .hasBuildingRoom &&
188
+ ' latitude' in this .meetingData .meeting &&
189
+ ' longitude' in this .meetingData .meeting
160
190
) {
161
191
return ` http://maps.google.com/maps?q=${
162
192
this .meetingData .meeting .latitude
@@ -169,8 +199,9 @@ export default {
169
199
showConfirmLink () {
170
200
return (
171
201
this .meetingData .section .is_teaching &&
172
- this .isFinalsCard &&
202
+ this .isFinalsTab &&
173
203
this .meetingData .section .is_primary_section &&
204
+ this .meetingData .section .final_exam &&
174
205
! this .meetingData .section .final_exam .no_exam_or_nontraditional &&
175
206
! this .meetingData .section .final_exam .is_confirmed
176
207
);
@@ -220,20 +251,6 @@ export default {
220
251
getMFM (t ) {
221
252
return (t .hour () * 60 ) + t .minute ();
222
253
},
223
- isRoomTBD () {
224
- return (
225
- this .meetingData .meeting == null ||
226
- (
227
- this .meetingData .meeting .room_tbd ||
228
- ! (
229
- ' building' in this .meetingData .meeting &&
230
- this .meetingData .meeting .building != ' *' &&
231
- ' room' in this .meetingData .meeting &&
232
- this .meetingData .meeting .room != ' *'
233
- )
234
- )
235
- );
236
- },
237
254
},
238
255
};
239
256
</script >
0 commit comments