Skip to content

Commit

Permalink
feat(import): present default values on report
Browse files Browse the repository at this point in the history
  • Loading branch information
20cents committed Nov 28, 2024
1 parent 1818351 commit 534261b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,15 @@ <h6>Champs ({{ (importData?.fieldmapping || {} | keyvalue).length }})</h6>
<tr>
<th>Champ source</th>
<th>Champ cible</th>
<th>Valeur par défaut</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let field of entity?.themes">
<td>{{ field.source }}</td>
<td>{{ field.destination }}</td>
<td>{{ field.default_value }}</td>
<td>{{ field.description }}</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,12 @@ export class ImportReportComponent implements OnInit {

mapField(listField: Field[], fieldMapping: FieldMappingValues): Array<CorrespondancesField> {
const mappedFields: Array<CorrespondancesField> = listField.map((field) => {
const mapping = fieldMapping[field.name_field];
return {
source: fieldMapping[field.name_field].column_src,
source: mapping?.column_src,
description: field.comment,
destination: field.name_field,
default_value: mapping?.default_value,
};
});
return mappedFields;
Expand Down

0 comments on commit 534261b

Please sign in to comment.