-
-
Notifications
You must be signed in to change notification settings - Fork 945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAK-50690 Meetings add banner to register and add option to download assistance reports CSV #13027
base: master
Are you sure you want to change the base?
Conversation
The banner is optional, it can be hidden using a property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly fine, just a few changes
# SAK-50690 Meetings: select message and option to show attendance reports | ||
# Select whether to display the informational alert of the meetings tool. | ||
# DEFAULT: false | ||
# show.meeting.banner=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# show.meeting.banner=false | |
# show.meeting.banner=true |
List<AttendanceRecord> attendanceRecords = microsoftCommonService.getMeetingAttendanceReport(onlineMeetingId, organizerEmail); | ||
if ("csv".equalsIgnoreCase(format)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix tabulation
meeting.entry_date=Entry Date | ||
meeting.exit_date=Exit Date | ||
meeting.interval_duration=Interval Duration (seconds) | ||
meeting.details=Assistance Details for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meeting.details=Assistance Details for | |
meeting.details=Assistance Details for | |
meeting.exit_date=Data de sortida | ||
meeting.interval_duration=Interval de Duraci\u00F3 (segons) | ||
meeting.details=Detalls d\u2019assist\u00e8ncia per a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meeting.details=Detalls d\u2019assist\u00e8ncia per a | |
meeting.details=Detalls d\u2019assist\u00e8ncia per a | |
meeting.entry_date=Fecha de entrada | ||
meeting.exit_date=Fecha de salida | ||
meeting.interval_duration=Intervalo de Duraci\u00f3n (segundos) | ||
meeting.details=Detalles de asistencia para |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meeting.details=Detalles de asistencia para | |
meeting.details=Detalles de asistencia para | |
console.error('Error loading meeting banner configuration.'); | ||
} | ||
} catch (error) { | ||
console.error('Error loading meeting banner configuration:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.error('Error loading meeting banner configuration:', error); | |
console.error('Error loading default configuration:', error); |
Let's make it more generic in case we need it for other properties in the future
|
||
try { | ||
List<AttendanceRecord> attendanceRecords = microsoftCommonService.getMeetingAttendanceReport(onlineMeetingId, organizerEmail); | ||
if ("csv".equalsIgnoreCase(format)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a constant defined at the top, something like REPORT_FORMAT_CSV = "csv"
if ("csv".equalsIgnoreCase(format)) { | ||
byte[] csvContent = microsoftCommonService.createAttendanceReportCsv(attendanceRecords); | ||
return ResponseEntity.ok() | ||
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"attendance_report.csv\"") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to use a constante for the filename too
|
||
|
||
public void inicializeMeetingNameColumns(String meetingAttendanceReport, String meetingName, String meetingEmail, String meetingRole, String meetingDuration, String meetingDurationInterval, String meetingEntryDate, String meetingExitDate, String meetingsDetails) { | ||
MEETING_ATTENDANCE_REPORT= meetingAttendanceReport; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this variable is used anywhere else
String onlineMeetingId = meetingService.getMeetingProperty(meeting, ONLINE_MEETING_ID); | ||
String organizerEmail = meetingService.getMeetingProperty(meeting, ORGANIZER_USER); | ||
checkUpdatePermissions(meeting.getSiteId()); | ||
microsoftCommonService.inicializeMeetingNameColumns(rb.getString("meeting.attendance_report"), rb.getString("meeting.column_name"), rb.getString("meeting.column_email"), rb.getString("meeting.column_role"), rb.getString("meeting.column_duration"), rb.getString("meeting.interval_duration"), rb.getString("meeting.entry_date"), rb.getString("meeting.exit_date"), rb.getString("meeting.details")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this method is not necessary, it might be better doing that inside the create report method directly
microsoft-integration/impl/pom.xml
Outdated
</dependencies> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-csv</artifactId> | ||
<version>1.10.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix tabs
microsoftCommonService.inicializeMeetingNameColumns(columnsName); | ||
|
||
try { | ||
List<AttendanceRecord> attendanceRecords = microsoftCommonService.getMeetingAttendanceReport(onlineMeetingId, organizerEmail); | ||
if (REPORT_FORMAT_CSV.equalsIgnoreCase(format)) { | ||
byte[] csvContent = microsoftCommonService.createAttendanceReportCsv(attendanceRecords); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
microsoftCommonService.inicializeMeetingNameColumns(columnsName); | |
try { | |
List<AttendanceRecord> attendanceRecords = microsoftCommonService.getMeetingAttendanceReport(onlineMeetingId, organizerEmail); | |
if (REPORT_FORMAT_CSV.equalsIgnoreCase(format)) { | |
byte[] csvContent = microsoftCommonService.createAttendanceReportCsv(attendanceRecords); | |
try { | |
List<AttendanceRecord> attendanceRecords = microsoftCommonService.getMeetingAttendanceReport(onlineMeetingId, organizerEmail); | |
if (REPORT_FORMAT_CSV.equalsIgnoreCase(format)) { | |
byte[] csvContent = microsoftCommonService.createAttendanceReportCsv(attendanceRecords, columnsName); |
@@ -115,7 +116,10 @@ public static enum PermissionRoles { READ, WRITE } | |||
TeamsMeetingData createOnlineMeeting(String userEmail, String subject, Instant startDate, Instant endDate, List<String> coorganizerEmails) throws MicrosoftCredentialsException; | |||
void updateOnlineMeeting(String userEmail, String meetingId, String subject, Instant startDate, Instant endDate, List<String> coorganizerEmails) throws MicrosoftCredentialsException; | |||
List<MeetingRecordingData> getOnlineMeetingRecordings(String onlineMeetingId, List<String> teamIdsList, boolean force) throws MicrosoftCredentialsException; | |||
|
|||
List<AttendanceRecord> getMeetingAttendanceReport(String onlineMeetingId, String userEmail) throws MicrosoftCredentialsException; | |||
void inicializeMeetingNameColumns(List<String> columnsName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed
|
||
List<AttendanceRecord> getMeetingAttendanceReport(String onlineMeetingId, String userEmail) throws MicrosoftCredentialsException; | ||
void inicializeMeetingNameColumns(List<String> columnsName); | ||
byte[] createAttendanceReportCsv(List<AttendanceRecord> attendanceRecords); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
byte[] createAttendanceReportCsv(List<AttendanceRecord> attendanceRecords); | |
byte[] createAttendanceReportCsv(List<AttendanceRecord> attendanceRecords, List<String> columnsName); |
fa645a5
to
8a152b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -12,6 +12,13 @@ status_text_unknown=estado desconocido | |||
status_text_waiting=esperando para comenzar | |||
edit_action=Editar | |||
delete_action=Eliminar | |||
close_action=Cerrar | |||
attendance_report_action=Informes de assistencia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Informes de asistencia
close_action=Cerrar | ||
attendance_report_action=Informes de assistencia | ||
download_report_excel= Descargar en csv | ||
download_report_error_message=Los datos de assistencia no se han cargado correctamente. Probarlo m\u00e1s tarde. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Los datos de asistencia
meeting_login_application=Inicia sessi\u00F3n con la aplicaci\u00F3n. | ||
meeting_not_application_installed=En caso de no tener la aplicaci\u00F3n instalada, este | ||
meeting_link=enlace | ||
meeting_download_by_link=te permitir\u00E1 descargartela. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
te permitir\u00E1 descarg\u00E1rtela.
spinner: "fa-spinner fa-spin", | ||
download: "fa fa-download", | ||
fileCsv: "fa fa-file", | ||
eye: "fa fa-eye", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eye: "fa fa-eye"
microsoft-integration/impl/pom.xml
Outdated
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-csv</artifactId> | ||
<version>1.10.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.12.0
|
||
@Transactional(readOnly = true) | ||
public byte[] createAttendanceReportCsv(List<AttendanceRecord> attendanceRecords, List<String> columnNames) { | ||
if (columnNames == null || columnNames.size() != 7) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll use a constant defined at the top for the number 7.
public static int COLUMN_SIZE = 7.
In the Meetings tool, add an informational alert at the top of the tool to inform the user that they need to register with Microsoft to sign in. Additionally, for each created meeting, provide the option to download the attendance report in CSV format and preview it.