(params: GroupFilter)
| 29 | }; |
| 30 | |
| 31 | export const buildGroupFilter = (params: GroupFilter) => { |
| 32 | const filter = []; |
| 33 | const search = params.query?.trim()?.toLowerCase(); |
| 34 | if (search) { |
| 35 | filter.push(`(title.contains("${search}") || email.contains("${search}"))`); |
| 36 | } |
| 37 | if (isValidProjectName(params.project)) { |
| 38 | filter.push(`project == "${params.project}"`); |
| 39 | } |
| 40 | return filter.join(" && "); |
| 41 | }; |
| 42 | |
| 43 | export const createGroupSlice: AppSliceCreator<GroupSlice> = (set, get) => ({ |
| 44 | groupsByName: {}, |
no test coverage detected