Skip to content

Commit

Permalink
fix(import, list) : debug hidden icon + debub error file download
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Oct 11, 2024
1 parent 0a459e9 commit cd74e5f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ <h5 class="card-title mb-0">Liste des imports</h5>
matTooltipClass="Datatable__buttonTooltip"
[attr.data-qa]="'import-list-table-row-' + index + '-statistics-toggle'"
>
<mat-icon>query_stats</mat-icon>
<i
class="fa fa-line-chart"
aria-hidden="true"
></i>
</mat-button-toggle>
</ng-template>
</ngx-datatable-column>
Expand Down Expand Up @@ -231,11 +234,14 @@ <h5 class="card-title mb-0">Liste des imports</h5>
mat-icon-button
class="Datatable__button"
color="primary"
(click)="_csvExport.onCSV(row.id_import)"
(click)="downloadFileWithInvalidLine(row)"
matTooltip="Téléchargement des données invalides"
[attr.data-qa]="'import-list-table-row-' + index + '-actions-csv'"
>
<mat-icon>download</mat-icon>
<i
class="fa fa-download"
aria-hidden="true"
></i>
</button>
<button
[disabled]="!row?.cruved?.D || !row?.dataset?.active"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,15 @@ export class ImportListComponent implements OnInit {
saveAs(result, row.full_file_name);
});
}

/**
* Downloads a CSV file with the lines that had errors during the import.
*
* @param imprt The import that we want to download the errors for.
*/
downloadFileWithInvalidLine(imprt: Import) {
this._ds.setDestination(imprt.destination.code);
this._csvExport.onCSV(imprt.id_import);
}
formattedRowCount(row: Import): string {
return formatRowCount(row);
}
Expand Down

0 comments on commit cd74e5f

Please sign in to comment.