Export report table to CSV file using defined delimiter (#1798)

Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
José Alberto Hernández
2023-07-20 21:14:18 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent dd4b37c060
commit 3b140e6f34
20 changed files with 230 additions and 90 deletions
@@ -1,6 +1,8 @@
/** Angular Imports */
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { DialogData } from 'app/core/dialogs/dialog-data.model';
import { Dialogs } from 'app/core/dialogs/dialogs';
/**
* Delete dialog component.
@@ -18,27 +20,15 @@ export class ConfirmationDialogComponent implements OnInit {
* @param {any} data Provides a deleteContext.
*/
constructor(public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }
private dialogs: Dialogs,
@Inject(MAT_DIALOG_DATA) public data: DialogData) { }
ngOnInit() {
this.setColor();
}
setColor() {
switch (this.data.type) {
case 'Basic':
this.color = 'primary';
break;
case 'Mild':
this.color = 'primary';
break;
case 'Strong':
this.color = 'warn';
break;
default:
this.color = 'warn';
}
this.color = this.dialogs.setColor(this.data.type);
}
}