Allow to select direct children in processes
https://redmine.teklia.com/issues/10734
Requires backend#1924 (closed)
-
The TypeScript types for processes should be redefined with
load_children: 'none' | 'direct' | 'all'. -
In
src/components/HeaderActions.vue, thegetProcessFiltersmethod needs to be updated to use this new option and make the default filters easier on users:-
On an element with a non-folder type,
load_childrenis always set tonone. -
On an element with a folder type,
load_childrenis set todirect. Ifrecursive=truewas set in the filter bar,load_childrenis set toallinstead. -
On a corpus,
load_childrenis set tonone. We could use the value of thetop_levelfilter, but there are no common use cases that involve starting a process on a corpus, since most processes will be run on files that have been imported into a folder. Having zero elements selected by default will require users to explicitly select what elements they want first. -
The existing handling for
name,typeandclass_idremains the same.
-
-
In
src/views/Process/Filter.vue:- The Load children checkbox is now a
<select>, with None, Direct children and All children options. - When no elements are found with the selected filters, the warning notification shown by the
Paginatorshould invite users to change their filters. This case can be reached more easily now, since the None option will return zero elements for a process that runs on a corpus.
- The Load children checkbox is now a