TexasDigitalLibrary / Vireo

Vireo is a turnkey Electronic Thesis and Dissertation (ETD) Management System.
https://texasdigitallibrary.atlassian.net/wiki/spaces/VUG/pages/87490642/About
GNU General Public License v2.0
44 stars 33 forks source link

For the Admin List Filters, the Search Box Filter is not saved when added. #1875

Closed kaladay closed 1 month ago

kaladay commented 7 months ago

Selecting the Customize Filters under the Now Filtering By brings up a popup modal. Under the Disabled Filters, the Search Box is available.

After adding the Search Box to the Displayed Filters and clicking save, the Search Box neither appears under the Now Filering By nor does it appear under the Displayed Filters column after re-opening the Customize Filters modal.

Investigation has revealed that, in the past, this Search Box behavior was intentionally hidden.

There are two obvious paths to resolve this:

  1. Fully hide Search Box so that it does not appear in the Customize Filters as an option.
  2. Stop hiding the Search Box and implement it.

The second path is a bit complex and so I propose the first path. Just fully hide the Search Box.

A proof of concept draft PR is created here to show and demonstrate what needs to be done: File src/main/webapp/app/controllers/submission/submissionListController.js can have:

var managerFilterColumns = ManagerFilterColumnRepo.getAll().filter(function excludeSearchBox(slc) {
    return slc.title !== 'Search Box';
});

var submissionListColumns = SubmissionListColumnRepo.getAll();

$scope.userColumns = angular.fromJson(angular.toJson(ManagerSubmissionListColumnRepo.getAll()));

Changed to:

var managerFilterColumns = ManagerFilterColumnRepo.getAll().filter(function excludeSearchBox(slc) {
    return slc.title !== 'Search Box';
});

var submissionListColumns = SubmissionListColumnRepo.getAll().filter(function excludeSearchBox(slc) {
  return slc.title !== 'Search Box';
});

$scope.userColumns = angular.fromJson(angular.toJson(ManagerSubmissionListColumnRepo.getAll()));

A more in-depth investigation may be needed to make sure the changes from that draft do not have any issues.