diff --git a/service/src/main/inse/works/v2/router.py b/service/src/main/inse/works/v2/router.py index 87596cdd..13446ecd 100644 --- a/service/src/main/inse/works/v2/router.py +++ b/service/src/main/inse/works/v2/router.py @@ -24,7 +24,7 @@ router = APIRouter(prefix=RouterPrefixes.WORKS_V2, tags=[Tags.WORKS_V2]) @router.get( - "/{raw_oa_work_id}", + "/single/{raw_oa_work_id}", operation_id="getWorkById", summary="Returns a work based on its ID.", ) diff --git a/webapp/src/app/api/api/worksV2.service.ts b/webapp/src/app/api/api/worksV2.service.ts index 5e4801f2..9b8dc65d 100644 --- a/webapp/src/app/api/api/worksV2.service.ts +++ b/webapp/src/app/api/api/worksV2.service.ts @@ -511,7 +511,7 @@ export class WorksV2Service extends BaseService { /** * Returns a work based on its ID. - * @endpoint get /api/works/v2/{raw_oa_work_id} + * @endpoint get /api/works/v2/single/{raw_oa_work_id} * @param rawOaWorkId The raw OpenAlex work id. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. @@ -549,7 +549,7 @@ export class WorksV2Service extends BaseService { } } - let localVarPath = `/api/works/v2/${this.configuration.encodeParam({name: "rawOaWorkId", value: rawOaWorkId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + let localVarPath = `/api/works/v2/single/${this.configuration.encodeParam({name: "rawOaWorkId", value: rawOaWorkId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request('get', `${basePath}${localVarPath}`, { diff --git a/webapp/src/app/api/model/dfgProjectDetails.ts b/webapp/src/app/api/model/dfgProjectDetails.ts index f3846507..07bcced0 100644 --- a/webapp/src/app/api/model/dfgProjectDetails.ts +++ b/webapp/src/app/api/model/dfgProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,69 +14,71 @@ import { DFGProjectFachgebieteInner } from './dFGProjectFachgebieteInner'; import { Topic } from './topic'; import { DfgProjectPublicationSummary } from './dfgProjectPublicationSummary'; + /** * Clean, enriched summary model for a DFG project. */ -export interface DfgProjectDetails { - id?: number | null; - link?: string | null; - page_url?: string | null; - external_link?: string | null; - title_de?: string | null; - title_en?: string | null; - description_de?: string | null; - description_en?: string | null; - final_report_abstract_de?: string | null; - final_report_abstract_en?: string | null; - project_identifier_de?: string | null; - project_identifier_en?: string | null; - funding_start?: number | null; - funding_end?: number | null; - funding_period_de?: string | null; - funding_period_en?: string | null; - funding_type_de?: string | null; - funding_type_en?: string | null; - funding_type_key?: string | null; - dfg_procedure?: string | null; - is_transfer_project?: boolean | null; - website_html_de?: string | null; - website_html_en?: string | null; - equipment_group?: string | null; - equipment_name?: string | null; - subject_area_de?: string | null; - subject_area_en?: string | null; - /** - * Detailed DFG subject-area classification entries (Fachsystematik) - */ - subject_classifications?: Array; - international_relation_de?: string | null; - international_relation_en?: string | null; - /** - * All persons associated with the project, each with their role - */ - persons?: Array; - /** - * All institutions associated with the project, each with their role - */ - institutions?: Array; - /** - * Flat, de-duplicated list of all person full names (convenience view) - */ - associated_persons?: Array; - /** - * Flat, de-duplicated list of all institution names (convenience view) - */ - associated_institutions?: Array; - parent_project_id?: number | null; - parent_title_de?: string | null; - parent_title_en?: string | null; - /** - * Sub-projects of this project, if any - */ - subprojects?: Array; - /** - * Publications resulting from the project - */ - publications?: Array; - topics?: Array | null; +export interface DfgProjectDetails { + id?: number | null; + link?: string | null; + page_url?: string | null; + external_link?: string | null; + title_de?: string | null; + title_en?: string | null; + description_de?: string | null; + description_en?: string | null; + final_report_abstract_de?: string | null; + final_report_abstract_en?: string | null; + project_identifier_de?: string | null; + project_identifier_en?: string | null; + funding_start?: number | null; + funding_end?: number | null; + funding_period_de?: string | null; + funding_period_en?: string | null; + funding_type_de?: string | null; + funding_type_en?: string | null; + funding_type_key?: string | null; + dfg_procedure?: string | null; + is_transfer_project?: boolean | null; + website_html_de?: string | null; + website_html_en?: string | null; + equipment_group?: string | null; + equipment_name?: string | null; + subject_area_de?: string | null; + subject_area_en?: string | null; + /** + * Detailed DFG subject-area classification entries (Fachsystematik) + */ + subject_classifications?: Array; + international_relation_de?: string | null; + international_relation_en?: string | null; + /** + * All persons associated with the project, each with their role + */ + persons?: Array; + /** + * All institutions associated with the project, each with their role + */ + institutions?: Array; + /** + * Flat, de-duplicated list of all person full names (convenience view) + */ + associated_persons?: Array; + /** + * Flat, de-duplicated list of all institution names (convenience view) + */ + associated_institutions?: Array; + parent_project_id?: number | null; + parent_title_de?: string | null; + parent_title_en?: string | null; + /** + * Sub-projects of this project, if any + */ + subprojects?: Array; + /** + * Publications resulting from the project + */ + publications?: Array; + topics?: Array | null; } + diff --git a/webapp/src/app/api/model/dfgProjectKeyword.ts b/webapp/src/app/api/model/dfgProjectKeyword.ts index f81b6ad4..2e898f1c 100644 --- a/webapp/src/app/api/model/dfgProjectKeyword.ts +++ b/webapp/src/app/api/model/dfgProjectKeyword.ts @@ -1,14 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface DfgProjectKeyword { - name: string; - project_count: number; + +export interface DfgProjectKeyword { + name: string; + project_count: number; } + diff --git a/webapp/src/app/api/model/dfgProjectTopic.ts b/webapp/src/app/api/model/dfgProjectTopic.ts index ca22eb28..4b99c034 100644 --- a/webapp/src/app/api/model/dfgProjectTopic.ts +++ b/webapp/src/app/api/model/dfgProjectTopic.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,14 @@ */ import { DfgProjectKeyword } from './dfgProjectKeyword'; -export interface DfgProjectTopic { - id: string; - name: string; - subfield?: string | null; - field?: string | null; - domain?: string | null; - project_count: number; - keywords: Array; + +export interface DfgProjectTopic { + id: string; + name: string; + subfield?: string | null; + field?: string | null; + domain?: string | null; + project_count: number; + keywords: Array; } + diff --git a/webapp/src/app/shared/ui/app-institution-card/app-institution-card.component.ts b/webapp/src/app/shared/ui/app-institution-card/app-institution-card.component.ts index 2502c36f..8b92a5b4 100644 --- a/webapp/src/app/shared/ui/app-institution-card/app-institution-card.component.ts +++ b/webapp/src/app/shared/ui/app-institution-card/app-institution-card.component.ts @@ -46,14 +46,13 @@ export class AppInstitutionCardComponent { }); isOwnInstitution = computed(() => { - const id = this.stripOpenAlexId(this.institution().id); - if (!id) return false; + const institutionId = this.stripOpenAlexId(this.institution().id); + if (!institutionId) return false; - console.log( - `Comparing institution ID ${id} with effective institution ID ${this.credentialService.effectiveInstitutionId()}`, - ); + const effectiveInstitutionId = + this.credentialService.effectiveInstitutionId(); - return id === this.credentialService.effectiveInstitutionId(); + return institutionId === effectiveInstitutionId; }); // The "Patente" action only makes sense once org_patents has been indexed