Parcourir la source

Updated to line up with the latest JSON structure from the REST API

jalbr74 il y a 6 ans
Parent
commit
b6cef2e8ff

+ 1 - 1
client/src/modules/peoplesearch/peoplesearch-cards.component.html

@@ -60,7 +60,7 @@
     <div ng-repeat="query in $ctrl.queries">
     <div ng-repeat="query in $ctrl.queries">
         <select ng-model="query.name">
         <select ng-model="query.name">
             <option value="" selected disabled>{{ 'Display_SelectAttribute' | translate }}</option>
             <option value="" selected disabled>{{ 'Display_SelectAttribute' | translate }}</option>
-            <option ng-repeat="tag in $ctrl.advancedSearchTags" ng-attr-value="{{tag.id}}">{{tag.attribute}}</option>
+            <option ng-repeat="tag in $ctrl.advancedSearchTags" ng-attr-value="{{tag.attribute}}">{{tag.label}}</option>
         </select>
         </select>
         <input ng-model="query.value" autocomplete="off">
         <input ng-model="query.value" autocomplete="off">
         <ias-button class="ias-icon-button" ng-click="$ctrl.removeSearchTag($index)" ng-if="$index > 0"
         <ias-button class="ias-icon-button" ng-click="$ctrl.removeSearchTag($index)" ng-if="$index > 0"

+ 4 - 2
client/src/services/peoplesearch-config.service.ts

@@ -37,8 +37,10 @@ export interface AdvancedSearchConfig {
     enabled: boolean;
     enabled: boolean;
     maxRows: number;
     maxRows: number;
     attributes: {
     attributes: {
-        'id': string;
-        'attribute': string;
+        attribute: string,
+        label: string,
+        type: string,
+        options: any
     }[];
     }[];
 }
 }