filterjhipster

Jhipster generator doesn't generate filter panel in UI


I use jhipster to generate CRUD for my web application. by configuring jdl generator, I expect to see search panel in UI for each entity. But it just generates EntityQueryService classes in backend. It works fine and The API is reachable in swagger-ui. Is there any UI lib to help me pass parameters as expected format or any pre-defined filter panel in web?

Thanks.


Solution

  • Finally I addded manual search panel as below :

      <div class="container-fluid">
            <div class="row">
                <jhi-alert-error></jhi-alert-error>
                <div class="col-sm-4">
                    <label for="field_billOrgType">organization</label>
                    <select id="field_billOrgType" ng-model="vm.searchModel.billOrgType">
                        <option ng-repeat="x in vm.Utilities" value="{{x.key}}">{{x.name}} - {{x.key}}</option>
                    </select>
                </div>
                </div>
            </div>
    

    My controller:

    ( function () {
        'use strict';
         angular
             .module('ebppApp')
             .factory('TmpBill', TmpBill);
     TmpBill.$inject = ['$resource'];
     function TmpBill($resource) {
         var resourceUrl = 'api/tmp-bills/:id';
    
         return $resource(resourceUrl, {}, {
             'search': {
                 method: 'GET'
                 , isArray: true
                 , url: 'api/tmp-bills?:billOrgType',
                 params: {
                     billOrgType: '@billOrgType'
                 }
                 }
             }
         });
     } })();
    
         function search() {
    
             TmpBill.search({
    
                 billOrgType: vm.searchModel.billOrgType ? "billOrgType.equals=" + vm.searchModel.billOrgType : ''
                 page: vm.page - 1,
                 size: vm.itemsPerPage,
                 sort: sort()
             }, onSuccess, onError);
             function sort() {
                 var result = [vm.predicate + ',' + (vm.reverse ? 'asc' : 'desc')];
                 if (vm.predicate !== 'id') {
                     result.push('id');
                 }
                 return result;
             }
    
             function onSuccess(data, headers) {
                 vm.links = ParseLinks.parse(headers('link'));
                 vm.totalItems = headers('X-Total-Count');
                 vm.queryCount = vm.totalItems;
                 vm.tmpBills = data;
                 // vm.page = pagingParams.page;
             }
    
             function onError(error) {
                 AlertService.error(error.data.message);
             }
         }