Skip to content

Commit c770f61

Browse files
authored
Merge pull request #5119 from johncrossman/BOAC-6242_appt-times
BOAC-6242, if appt has starts_at then display it
2 parents b5e9922 + e586d75 commit c770f61

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

boac/merged/advising_appointment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def appointment_to_compatible_json(appointment, topics=(), attachments=None, eve
174174
'deptCode': dept_code,
175175
'deptName': BERKELEY_DEPT_CODE_TO_NAME.get(dept_code, dept_code),
176176
})
177+
starts_at = appointment.get('starts_at').isoformat() if appointment.get('starts_at') else None
177178
api_json = {
178179
'id': appointment_id,
179180
'advisor': {
@@ -190,11 +191,12 @@ def appointment_to_compatible_json(appointment, topics=(), attachments=None, eve
190191
'appointmentTitle': appointment.get('title'),
191192
'appointmentType': appointment_type,
192193
'attachments': attachments,
193-
'createdAt': resolve_sis_created_at(appointment) or appointment.get('starts_at').isoformat(),
194+
'createdAt': resolve_sis_created_at(appointment) or starts_at,
194195
'createdBy': created_by,
195196
'deptCode': appointment.get('dept_code'),
196197
'details': appointment.get('details'),
197198
'endsAt': appointment.get('ends_at').isoformat() if created_by in ['Calendly', 'YCBM'] and appointment.get('ends_at') else None,
199+
'startsAt': starts_at,
198200
'student': {
199201
'sid': appointment.get('student_sid'),
200202
},

src/components/student/profile/academic-timeline/AcademicTimelineTable.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,11 @@ const getRowAriaLabelledBy = (message, index) => {
711711
712712
const getSameDayDate = message => {
713713
const format = 'h:mm a'
714+
const startTime = formatDate(message.startsAt || message.createdAt, format)
715+
const endTime = formatDate(message.endsAt, format)
714716
return {
715-
visual: `${formatDate(message.createdAt, format)} - ${formatDate(message.endsAt, format)}`,
716-
screenReader: `${formatDate(message.createdAt, format)} to ${formatDate(message.endsAt, format)}`
717+
visual: `${startTime} - ${endTime}`,
718+
screenReader: `${startTime} to ${endTime}`
717719
}
718720
}
719721

0 commit comments

Comments
 (0)