Skip to content
Snippets Groups Projects
Commit 50836d71 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #14458 TIME 0:15 fix table width + multival custom fields

parent 9e8889bd
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@
</div>
<div style="width:100%;box-shadow: inset 0px 0px 5px 0px rgba(0,0,0,0.75);padding:10px;">
<div style="overflow: auto;">
<mat-table *ngIf="csvData.length > 0" #table [dataSource]="dataSource" style="width:5000px;">
<mat-table *ngIf="csvData.length > 0" #table [dataSource]="dataSource" [style.width.px]="contactColumns.length * 300">
<ng-container *ngFor="let column of contactColumns;let i=index;">
<ng-container [matColumnDef]="column.id">
<mat-header-cell *matHeaderCellDef style="padding-left: 5px;padding-right: 5px;">
......
......@@ -152,7 +152,8 @@ export class ContactImportComponent implements OnInit {
data = data.customFields.map(custom => {
return {
id: `contactCustomField_${custom.id}`,
label: custom.label
label: custom.label,
type: custom.type
};
});
return data;
......@@ -315,7 +316,12 @@ export class ContactImportComponent implements OnInit {
if (element[this.associatedColmuns[key.id]] === undefined) {
objContact[key.id] = '';
} else {
objContact[key.id] = element[this.associatedColmuns[key.id]].includes('\n') ? element[this.associatedColmuns[key.id]].split('\n') : element[this.associatedColmuns[key.id]];
if (key.type === 'checkbox') {
objContact[key.id] = !this.functionsService.empty(element[this.associatedColmuns[key.id]]) ? element[this.associatedColmuns[key.id]].split('\n') : [];
} else {
objContact[key.id] = element[this.associatedColmuns[key.id]];
}
}
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment