MOBILE-4077 ReportBuilder: Sort reports list and update lang strings

main
Alfonso Salces 2023-02-07 12:57:22 +01:00
parent 7b37a907a9
commit fc98bf5796
5 changed files with 8 additions and 8 deletions

View File

@ -1653,9 +1653,9 @@
"core.currentdevice": "local_moodlemobileapp",
"core.custom": "form",
"core.reportbuilder.modifiedby": "tool_reportbuilder",
"core.reportbuilder.reportstab": "tool_reportbuilder",
"core.reportbuilder.reportsource": "tool_reportbuilder",
"core.reportbuilder.timecreated": "tool_reportbuilder",
"core.reportbuilder.reports": "moodle",
"core.reportbuilder.reportsource": "moodle",
"core.reportbuilder.timecreated": "moodle",
"core.reportbuilder.showcolumns": "local_moodlemobileapp",
"core.reportbuilder.hidecolumns": "local_moodlemobileapp",
"core.datastoredoffline": "local_moodlemobileapp",

View File

@ -41,7 +41,7 @@ export class CoreReportBuilderReportsSource extends CoreRoutedItemsManagerSource
*/
protected setItems(reports: CoreReportBuilderReport[], hasMoreItems: boolean): void {
const sortedReports = reports.slice(0);
reports.sort((a, b) => a.timecreated < b.timecreated ? 1 : -1);
sortedReports.sort((a, b) => a.timemodified < b.timemodified ? 1 : -1);
super.setItems(sortedReports, hasMoreItems);
}

View File

@ -1,6 +1,6 @@
{
"modifiedby": "Modified by",
"reportstab": "Reports",
"reports": "Reports",
"reportsource": "Report source",
"timecreated": "Time created",
"showcolumns": "Show columns",

View File

@ -4,7 +4,7 @@
<ion-back-button [text]="'core.back' | translate"></ion-back-button>
</ion-buttons>
<ion-title>
<h1>{{ 'core.reportbuilder.reportstab' | translate }}</h1>
<h1>{{ 'core.reportbuilder.reports' | translate }}</h1>
</ion-title>
</ion-toolbar>
</ion-header>

View File

@ -45,11 +45,11 @@ export class CoreReportBuilderHandlerService implements CoreUserProfileHandler {
return {
class: 'core-report-builder',
icon: 'fa-list-alt',
title: 'core.reportbuilder.reportstab',
title: 'core.reportbuilder.reports',
action: async (event): Promise<void> => {
event.preventDefault();
event.stopPropagation();
await CoreNavigator.navigate(`/${CoreReportBuilderHandlerService.PAGE_NAME}`);
await CoreNavigator.navigateToSitePath(CoreReportBuilderHandlerService.PAGE_NAME);
},
};
}