Skip to content

Commit baf115b

Browse files
committed
fix: few issues with layer styling
1 parent 47532f9 commit baf115b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

libs/safe/src/lib/components/ui/map/layer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ export class Layer implements LayerModel {
463463
null
464464
);
465465
const uniqueValueSymbol =
466-
uniqueValueInfos.find((x) => x.value === fieldValue)?.symbol ||
466+
uniqueValueInfos.find((x) => x.value == fieldValue)?.symbol ||
467467
uniqueValueDefaultSymbol;
468468
return {
469469
fillColor: uniqueValueSymbol.color,

libs/safe/src/lib/services/map/map-layers.service.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,16 @@ export class SafeMapLayersService {
223223
});
224224
}
225225
return field;
226-
// this.fields.next(field);
227226
})
228227
// @TODO To be improved - Get only the JSON type fields for this case
229-
.filter((x: any) => x !== null && x.type.name === 'JSON');
230-
return this.aggregationBuilder.fieldsAfter(
231-
selectedFields,
232-
aggregation?.pipeline
233-
);
228+
.filter((x: any) => x !== null);
229+
return this.aggregationBuilder
230+
.fieldsAfter(selectedFields, aggregation?.pipeline)
231+
.map((field) => ({
232+
name: field.name,
233+
label: field.name,
234+
type: field.type.name,
235+
}));
234236
}
235237

236238
// @TODO Copied method from tab-main.component, this one should be refactored in the needed places

0 commit comments

Comments
 (0)