reference listing fix type display and filter

This commit is contained in:
CITE\amentis 2024-08-29 17:26:43 +03:00
parent f6453bfe6a
commit fd4be758c0
2 changed files with 5 additions and 4 deletions

View File

@ -34,8 +34,8 @@
<div class="col-12">
<mat-form-field class="w-100">
<mat-label>{{'REFERENCE-LISTING.FILTER.TYPE' | translate}}</mat-label>
<app-single-auto-complete [(ngModel)]="internalFilters.typeIds" placeholder="{{'REFERENCE-LISTING.FILTER.TYPE' | translate}}" [configuration]="referenceTypeService.singleAutocompleteConfiguration">
</app-single-auto-complete>
<app-multiple-auto-complete [(ngModel)]="internalFilters.typeIds" placeholder="{{'REFERENCE-LISTING.FILTER.TYPE' | translate}}" [configuration]="referenceTypeService.multipleAutocompleteConfiguration">
</app-multiple-auto-complete>
</mat-form-field>
</div>
</div>

View File

@ -44,7 +44,8 @@ export class ReferenceListingComponent extends BaseListingComponent<Reference, R
nameof<Reference>(x => x.label),
nameof<Reference>(x => x.source),
nameof<Reference>(x => x.sourceType),
nameof<Reference>(x => x.type),
nameof<Reference>(x => x.type.id),
nameof<Reference>(x => x.type.name),
nameof<Reference>(x => x.updatedAt),
nameof<Reference>(x => x.createdAt),
nameof<Reference>(x => x.hash),
@ -121,7 +122,7 @@ export class ReferenceListingComponent extends BaseListingComponent<Reference, R
pipe: this.pipeService.getPipe<ReferenceSourceTypePipe>(ReferenceSourceTypePipe)
},
{
prop: nameof<Reference>(x => x.type),
prop: nameof<Reference>(x => x.type.name),
sortable: true,
languageName: 'REFERENCE-LISTING.FIELDS.TYPE',
valueFunction: (item: Reference) => (item?.type?.name)