dto naming consistency, fix valign of list names

This commit is contained in:
Collin M. Barrett 2018-03-24 13:13:21 -05:00
parent c176ff73c4
commit 3971cd38bf
5 changed files with 9 additions and 5 deletions

View file

@ -16,12 +16,12 @@ public FilterListService(FilterListsDbContext filterListsDbContext)
this.filterListsDbContext = filterListsDbContext;
}
public async Task<IEnumerable<FilterListSummaryDto>> GetAllSummariesAsync()
public async Task<IEnumerable<ListSummaryDto>> GetAllSummariesAsync()
{
return await filterListsDbContext.FilterLists
.AsNoTracking()
.OrderBy(x => x.Name)
.ProjectTo<FilterListSummaryDto>()
.ProjectTo<ListSummaryDto>()
.ToListAsync();
}

View file

@ -2,7 +2,7 @@
namespace FilterLists.Services.FilterListService
{
public class FilterListSummaryDto
public class ListSummaryDto
{
public int Id { get; set; }
public IEnumerable<ListLanguagesDto> Languages { get; set; }

View file

@ -8,7 +8,7 @@ public class MappingProfiles : Profile
{
public MappingProfiles()
{
CreateMap<FilterList, FilterListSummaryDto>()
CreateMap<FilterList, ListSummaryDto>()
.ForMember(dto => dto.Languages,
conf => conf.MapFrom(list =>
list.FilterListLanguages.Select(listLangs => listLangs.Language)));

View file

@ -53,7 +53,7 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
filterMethod: (filter: any, row: any) => row[filter.id].toUpperCase()
.includes(filter.value.toUpperCase()),
sortMethod: (a: any, b: any) => a.toUpperCase() > b.toUpperCase() ? 1 : -1,
Cell: (cell: any) => <h2>{cell.value}</h2>
Cell: (cell: any) => <h2 className="list-title">{cell.value}</h2>
},
{
Header: "Languages",

View file

@ -15,6 +15,10 @@ body, h2, h3, h4, h5, blockquote {
align-items: center;
}
.list-title {
margin: 0;
}
.panel-list-details {
padding: 20px;
margin-bottom: 0;