Move aliases up (not happy with how it looks still)
This commit is contained in:
parent
fc39a2035f
commit
697a3bb52b
4 changed files with 7 additions and 11 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using API.Data;
|
||||
using API.Data.Repositories;
|
||||
|
|
@ -187,7 +186,7 @@ public class PersonController : BaseApiController
|
|||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("merge")]
|
||||
public async Task<ActionResult<PersonDto>> MergePersons(PersonMergeDto dto)
|
||||
public async Task<ActionResult<PersonDto>> MergePeople(PersonMergeDto dto)
|
||||
{
|
||||
var dst = await _unitOfWork.PersonRepository.GetPersonById(dto.DestId, PersonIncludes.All);
|
||||
if (dst == null) return BadRequest();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System.Linq;
|
||||
using API.Data.Repositories;
|
||||
using API.Entities;
|
||||
using API.Entities.Metadata;
|
||||
using API.Entities.Person;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using API.Entities;
|
||||
using API.Entities.Enums;
|
||||
using API.Entities.Metadata;
|
||||
using API.Entities.Person;
|
||||
using API.Extensions;
|
||||
|
||||
|
|
@ -37,7 +34,7 @@ public class PersonBuilder : IEntityBuilder<Person>
|
|||
|
||||
public PersonBuilder WithAlias(string alias)
|
||||
{
|
||||
if (_person.Aliases.Any(a => a.NormalizedAlias.Equals(alias)))
|
||||
if (_person.Aliases.Any(a => a.NormalizedAlias.Equals(alias.ToNormalized())))
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@
|
|||
}
|
||||
</h2>
|
||||
</ng-container>
|
||||
<ng-container subtitle>
|
||||
@if (person.aliases.length > 0) {
|
||||
<span>{{t('aka')}} {{person.aliases.join(", ")}}</span>
|
||||
}
|
||||
</ng-container>
|
||||
</app-side-nav-companion-bar>
|
||||
</div>
|
||||
|
||||
|
|
@ -43,10 +48,6 @@
|
|||
|
||||
<div class="col-xl-10 col-lg-7 col-md-12 col-xs-12 col-sm-12 mt-2">
|
||||
<div class="row g-0 mt-2">
|
||||
@if (person.aliases.length > 0) {
|
||||
<!-- I can't UI, help! -->
|
||||
<span>{{t('aka')}} {{person.aliases.join(", ")}}</span>
|
||||
}
|
||||
<app-read-more [text]="person.description || t('no-info')"></app-read-more>
|
||||
|
||||
@if (roles$ | async; as roles) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue