Skip to content

Commit

Permalink
fix(Facilities): Unlock facility selector to more than 10 results
Browse files Browse the repository at this point in the history
OpenSILEX/opensilex-dev!1283
  • Loading branch information
PRADO SEBASTIEN committed Sep 23, 2024
1 parent dd6715f commit fe9557e
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
import Vue from "vue";
import HttpResponse, { OpenSilexResponse } from "opensilex-core/HttpResponse";
import {OrganizationsService} from "opensilex-core/api/organizations.service";
import { NamedResourceDTO } from 'opensilex-core/index';
import { NamedResourceDTO, FacilityGetDTO } from 'opensilex-core/index';
import OpenSilexVuePlugin from "../../models/OpenSilexVuePlugin";
@Component
export default class FacilitySelector extends Vue {
$opensilex: any;
$opensilex: OpenSilexVuePlugin;
$service: OrganizationsService;
@PropSync("facilities", {default: () => []})
Expand All @@ -52,31 +53,31 @@
this.$service = this.$opensilex.getService("opensilex.OrganizationsService");
}
searchFacilities(searchQuery, page, pageSize) {
return this.$service.searchFacilities(
searchQuery, //name
searchFacilities(searchQuery) {
return this.$service.minimalSearchFacilities(
searchQuery,
undefined,
undefined,
undefined,
page,
pageSize
0
).then((http: HttpResponse<OpenSilexResponse<Array<NamedResourceDTO>>>) => {
return http;
}).catch(this.$opensilex.errorHandler);
}
loadFacilities(facilitiesUris) {
if (!facilitiesUris || facilitiesUris.length == 0) {
return undefined;
}
return this.$service
.getFacilitiesByURI(facilitiesUris)
.then((http: HttpResponse<OpenSilexResponse<Array<any>>>) =>
(http && http.response) ? http.response.result : undefined
);
}
facilityToSelectNode(dto: NamedResourceDTO) {
if(! dto){
return undefined;
Expand Down

0 comments on commit fe9557e

Please sign in to comment.