diff --git a/src/breeding-insight/dao/GermplasmDAO.ts b/src/breeding-insight/dao/GermplasmDAO.ts index 151777ffe..af5eeb1f2 100644 --- a/src/breeding-insight/dao/GermplasmDAO.ts +++ b/src/breeding-insight/dao/GermplasmDAO.ts @@ -20,6 +20,7 @@ import * as api from "@/util/api"; import {PaginationQuery} from "@/breeding-insight/model/PaginationQuery"; import {Result, ResultGenerator} from "@/breeding-insight/model/Result"; import {Germplasm} from "@/breeding-insight/brapi/model/germplasm"; +import {ListType} from "@/util/ListType"; export class GermplasmDAO { @@ -29,7 +30,7 @@ export class GermplasmDAO { config.url = `${process.env.VUE_APP_BI_API_V1_PATH}/programs/${programId}/brapi/v2/lists`; config.method = 'get'; config.programId = programId; - config.params = {}; + config.params = {listType: ListType.Germplasm}; if (paginationQuery.page) config.params.page = paginationQuery.page - 1; if (paginationQuery.pageSize) config.params.pageSize = paginationQuery.pageSize; diff --git a/src/util/ListType.ts b/src/util/ListType.ts new file mode 100644 index 000000000..09a2b11c6 --- /dev/null +++ b/src/util/ListType.ts @@ -0,0 +1,20 @@ +/* + * See the NOTICE file distributed with this work for additional information + * regarding copyright ownership. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export enum ListType { + Germplasm = "germplasm", +} diff --git a/src/views/germplasm/GermplasmLists.vue b/src/views/germplasm/GermplasmLists.vue index ae3b61043..8f3e702d8 100644 --- a/src/views/germplasm/GermplasmLists.vue +++ b/src/views/germplasm/GermplasmLists.vue @@ -34,6 +34,7 @@ import {GermplasmListSort, GermplasmListSortField} from "@/breeding-insight/mode import {PaginationController} from "@/breeding-insight/model/view_models/PaginationController"; import {BiResponse} from "@/breeding-insight/model/BiResponse"; import {BrAPIService, BrAPIType} from "@/breeding-insight/service/BrAPIService"; +import {ListType} from "@/util/ListType"; @Component({ components: { GermplasmListsTable @@ -44,7 +45,7 @@ export default class GermplasmLists extends ProgramsBase { private germplasmListFetch: (programId: string, sort: GermplasmListSort, paginationController: PaginationController) => ((filters: any) => Promise) = function (programId: string, sort: GermplasmListSort, paginationController: PaginationController) { return function (filters: any) { - filters.type='germplasm'; + filters.listType=ListType.Germplasm; return BrAPIService.get( BrAPIType.LIST, programId,