RED-10128: Incorrect File Extension for Downloaded (Multi-file) Reports
This commit is contained in:
parent
0329e74bbd
commit
05799650e6
@ -137,7 +137,15 @@ export default class ReportsScreenComponent implements OnInit {
|
||||
}
|
||||
|
||||
#getTemplateFilename(template: IReportTemplate): string {
|
||||
return `${template.fileName} ${template.multiFileReport ? this.#translateService.instant(_('reports-screen.multi-file-report')) : ''}`.trim();
|
||||
const extensionIndex = template.fileName.lastIndexOf('.');
|
||||
const hasExtension = extensionIndex !== -1;
|
||||
|
||||
const baseName = hasExtension ? template.fileName.substring(0, extensionIndex) : template.fileName;
|
||||
const extension = hasExtension ? template.fileName.substring(extensionIndex) : '';
|
||||
|
||||
const multiFileSuffix = template.multiFileReport ? ` ${this.#translateService.instant(_('reports-screen.multi-file-report'))}` : '';
|
||||
|
||||
return `${baseName}${multiFileSuffix}${extension}`.trim();
|
||||
}
|
||||
|
||||
async #openOverwriteConfirmationDialog(file: File, multiFileReport: boolean): Promise<void> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user