fix(server, web): people page (#7319)

* fix: people page

* fix: use locale

* fix: e2e

* fix: remove useless w-full

* fix: don't count people without thumbnail

* fix: es6 template string

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
martin 2024-02-21 23:03:45 +01:00 committed by GitHub
parent 546edc2e91
commit 5c0c98473d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 92 additions and 48 deletions

View file

@ -13,30 +13,36 @@ part of openapi.api;
class PeopleResponseDto {
/// Returns a new [PeopleResponseDto] instance.
PeopleResponseDto({
required this.hidden,
this.people = const [],
required this.total,
});
int hidden;
List<PersonResponseDto> people;
int total;
@override
bool operator ==(Object other) => identical(this, other) || other is PeopleResponseDto &&
other.hidden == hidden &&
_deepEquality.equals(other.people, people) &&
other.total == total;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(hidden.hashCode) +
(people.hashCode) +
(total.hashCode);
@override
String toString() => 'PeopleResponseDto[people=$people, total=$total]';
String toString() => 'PeopleResponseDto[hidden=$hidden, people=$people, total=$total]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'hidden'] = this.hidden;
json[r'people'] = this.people;
json[r'total'] = this.total;
return json;
@ -50,6 +56,7 @@ class PeopleResponseDto {
final json = value.cast<String, dynamic>();
return PeopleResponseDto(
hidden: mapValueOfType<int>(json, r'hidden')!,
people: PersonResponseDto.listFromJson(json[r'people']),
total: mapValueOfType<int>(json, r'total')!,
);
@ -99,6 +106,7 @@ class PeopleResponseDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'hidden',
'people',
'total',
};