Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upcoming projects for people #1061

Merged
merged 22 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b5158ae
chore(services/integration): add logging and some general improvements
IgnisDa Oct 10, 2024
263c025
Merge branch 'main' into issue-708
IgnisDa Oct 10, 2024
1579240
chore(providers): do not filter people roles
IgnisDa Oct 10, 2024
2ab2cd9
chore(providers): change order of attribues
IgnisDa Oct 10, 2024
1aeb884
chore(providers): download release date for people
IgnisDa Oct 10, 2024
cdf2bbc
feat(providers): start getting data in a more structured way
IgnisDa Oct 10, 2024
e7170ba
chore(backend): obey new structure
IgnisDa Oct 10, 2024
575c596
chore(backend): change name of field
IgnisDa Oct 10, 2024
35f06e2
chore(providers): remove useless fields
IgnisDa Oct 10, 2024
33b8ea4
fix(frontend): adapt to new gql schema
IgnisDa Oct 10, 2024
05f5b4f
chore(providers): extract into variable
IgnisDa Oct 10, 2024
71c44a4
feat(migrations): delete all metadata to person
IgnisDa Oct 10, 2024
72c3288
feat(providers): get character details for people correctly
IgnisDa Oct 10, 2024
12d4b4c
chore(providers): change order of attributes
IgnisDa Oct 10, 2024
36d8de1
feat(backend): return number of items for each grouped role
IgnisDa Oct 10, 2024
4290e4f
feat(frontend): general cleanup of people page
IgnisDa Oct 10, 2024
eace720
feat(frontend): allow filtering by role
IgnisDa Oct 10, 2024
650cd22
refactor(frontend): extract to component
IgnisDa Oct 10, 2024
51cc882
feat(frontend): add time filter
IgnisDa Oct 10, 2024
f1520fb
feat(frontend): get upcoming filter working
IgnisDa Oct 10, 2024
d495a4a
feat(frontend): set `is_partial` to true for all people
IgnisDa Oct 10, 2024
a778cb0
feat(frontend): beautify page
IgnisDa Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(backend): return number of items for each grouped role
  • Loading branch information
IgnisDa committed Oct 10, 2024
commit 36d8de189d88386555295ed30c8c078fc9975a5e
2 changes: 2 additions & 0 deletions crates/models/media/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,8 @@ pub struct PersonDetailsItemWithCharacter {

#[derive(Debug, Serialize, Deserialize, SimpleObject, Clone)]
pub struct PersonDetailsGroupedByRole {
/// The number of items in this role.
pub count: usize,
/// The name of the role performed.
pub name: String,
/// The media items in which this role was performed.
Expand Down
7 changes: 5 additions & 2 deletions crates/services/miscellaneous/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,11 @@ ORDER BY RANDOM() LIMIT 10;
let contents = contents
.into_iter()
.sorted_by_key(|(role, _)| role.clone())
.map(|(name, items)| PersonDetailsGroupedByRole { name, items })
.map(|(name, items)| PersonDetailsGroupedByRole {
count: items.len(),
name,
items,
})
.collect_vec();
let slug = slug::slugify(&details.name);
let identifier = &details.identifier;
Expand Down Expand Up @@ -3116,7 +3120,6 @@ ORDER BY RANDOM() LIMIT 10;
#[cfg(debug_assertions)]
pub async fn development_mutation(&self) -> Result<bool> {
tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
self.update_person("per_UMMu0GhlSrp1".to_string()).await?;
Ok(true)
}
}
4 changes: 2 additions & 2 deletions libs/generated/src/graphql/backend/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const documents = {
"query MetadataList($input: MetadataListInput!) {\n metadataList(input: $input) {\n details {\n total\n nextPage\n }\n items\n }\n}": types.MetadataListDocument,
"query MetadataSearch($input: MetadataSearchInput!) {\n metadataSearch(input: $input) {\n details {\n total\n nextPage\n }\n items {\n databaseId\n hasInteracted\n item {\n identifier\n title\n image\n publishYear\n }\n }\n }\n}": types.MetadataSearchDocument,
"query PeopleSearch($input: PeopleSearchInput!) {\n peopleSearch(input: $input) {\n details {\n total\n nextPage\n }\n items {\n identifier\n name\n image\n birthYear\n }\n }\n}": types.PeopleSearchDocument,
"query PersonDetails($personId: String!) {\n personDetails(personId: $personId) {\n sourceUrl\n details {\n id\n name\n source\n identifier\n isPartial\n description\n birthDate\n deathDate\n place\n website\n gender\n displayImages\n }\n contents {\n name\n items {\n character\n metadataId\n }\n }\n }\n}": types.PersonDetailsDocument,
"query PersonDetails($personId: String!) {\n personDetails(personId: $personId) {\n sourceUrl\n details {\n id\n name\n source\n identifier\n isPartial\n description\n birthDate\n deathDate\n place\n website\n gender\n displayImages\n }\n contents {\n name\n count\n items {\n character\n metadataId\n }\n }\n }\n}": types.PersonDetailsDocument,
"query UserDetails {\n userDetails {\n __typename\n ... on User {\n id\n lot\n name\n oidcIssuerId\n }\n }\n}": types.UserDetailsDocument,
"query UserExerciseDetails($exerciseId: String!) {\n userExerciseDetails(exerciseId: $exerciseId) {\n collections {\n ...CollectionPart\n }\n reviews {\n ...ReviewItemPart\n }\n history {\n idx\n workoutId\n workoutEndOn\n bestSet {\n ...WorkoutSetRecordPart\n }\n }\n details {\n exerciseId\n createdOn\n lastUpdatedOn\n exerciseNumTimesInteracted\n exerciseExtraInformation {\n lifetimeStats {\n weight\n reps\n distance\n duration\n personalBestsAchieved\n }\n personalBests {\n lot\n sets {\n workoutId\n exerciseIdx\n setIdx\n }\n }\n }\n }\n }\n}": types.UserExerciseDetailsDocument,
"query UserMeasurementsList($input: UserMeasurementsListInput!) {\n userMeasurementsList(input: $input) {\n timestamp\n name\n comment\n stats {\n weight\n bodyMassIndex\n totalBodyWater\n muscle\n leanBodyMass\n bodyFat\n boneMass\n visceralFat\n waistCircumference\n waistToHeightRatio\n hipCircumference\n waistToHipRatio\n chestCircumference\n thighCircumference\n bicepsCircumference\n neckCircumference\n bodyFatCaliper\n chestSkinfold\n abdominalSkinfold\n thighSkinfold\n basalMetabolicRate\n totalDailyEnergyExpenditure\n calories\n custom\n }\n }\n}": types.UserMeasurementsListDocument,
Expand Down Expand Up @@ -126,7 +126,7 @@ export function graphql(source: "query PeopleSearch($input: PeopleSearchInput!)
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "query PersonDetails($personId: String!) {\n personDetails(personId: $personId) {\n sourceUrl\n details {\n id\n name\n source\n identifier\n isPartial\n description\n birthDate\n deathDate\n place\n website\n gender\n displayImages\n }\n contents {\n name\n items {\n character\n metadataId\n }\n }\n }\n}"): (typeof documents)["query PersonDetails($personId: String!) {\n personDetails(personId: $personId) {\n sourceUrl\n details {\n id\n name\n source\n identifier\n isPartial\n description\n birthDate\n deathDate\n place\n website\n gender\n displayImages\n }\n contents {\n name\n items {\n character\n metadataId\n }\n }\n }\n}"];
export function graphql(source: "query PersonDetails($personId: String!) {\n personDetails(personId: $personId) {\n sourceUrl\n details {\n id\n name\n source\n identifier\n isPartial\n description\n birthDate\n deathDate\n place\n website\n gender\n displayImages\n }\n contents {\n name\n count\n items {\n character\n metadataId\n }\n }\n }\n}"): (typeof documents)["query PersonDetails($personId: String!) {\n personDetails(personId: $personId) {\n sourceUrl\n details {\n id\n name\n source\n identifier\n isPartial\n description\n birthDate\n deathDate\n place\n website\n gender\n displayImages\n }\n contents {\n name\n count\n items {\n character\n metadataId\n }\n }\n }\n}"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down
Loading