diff --git a/thoth-api/src/contributor/crud.rs b/thoth-api/src/contributor/crud.rs index 35444747..3737b6e6 100644 --- a/thoth-api/src/contributor/crud.rs +++ b/thoth-api/src/contributor/crud.rs @@ -77,6 +77,7 @@ impl Crud for Contributor { query = query.filter( full_name .ilike(format!("%{}%", filter)) + .or(last_name.ilike(format!("%{}%", filter))) .or(orcid.ilike(format!("%{}%", filter))), ); } @@ -104,6 +105,7 @@ impl Crud for Contributor { query = query.filter( full_name .ilike(format!("%{}%", filter)) + .or(last_name.ilike(format!("%{}%", filter))) .or(orcid.ilike(format!("%{}%", filter))), ); } diff --git a/thoth-api/src/graphql/model.rs b/thoth-api/src/graphql/model.rs index c3a9436d..a6e3e6d6 100644 --- a/thoth-api/src/graphql/model.rs +++ b/thoth-api/src/graphql/model.rs @@ -415,7 +415,7 @@ impl QueryRoot { offset(default = 0, description = "The number of items to skip"), filter( default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name and orcid" + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid" ), order( default = ContributorOrderBy::default(), @@ -455,7 +455,7 @@ impl QueryRoot { arguments( filter( default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name and orcid", + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid", ), ) )] @@ -815,7 +815,16 @@ impl QueryRoot { Subject::from_id(&context.db, &subject_id).map_err(|e| e.into()) } - #[graphql(description = "Get the total number of subjects associated to works")] + #[graphql( + description = "Get the total number of subjects associated to works", + arguments( + filter( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code", + ), + subject_type(description = "A specific type to filter by"), + ) + )] fn subject_count( context: &Context, filter: String, diff --git a/thoth-app/src/component/publication.rs b/thoth-app/src/component/publication.rs index 7c5649c4..12af937e 100644 --- a/thoth-app/src/component/publication.rs +++ b/thoth-app/src/component/publication.rs @@ -18,6 +18,7 @@ use crate::agent::notification_bus::NotificationBus; use crate::agent::notification_bus::NotificationDispatcher; use crate::agent::notification_bus::NotificationStatus; use crate::agent::notification_bus::Request; +use crate::component::delete_dialogue::ConfirmDeleteComponent; use crate::component::prices_form::PricesFormComponent; use crate::component::utils::Loader; use crate::models::publication::delete_publication_mutation::DeletePublicationRequest; @@ -32,7 +33,6 @@ use crate::models::publication::publication_query::PublicationRequestBody; use crate::models::publication::publication_query::Variables; use crate::route::AdminRoute; use crate::route::AppRoute; -use crate::string::DELETE_BUTTON; pub struct PublicationComponent { publication: PublicationWithRelations, @@ -219,9 +219,15 @@ impl Component for PublicationComponent {

- +