From 055941d8ae0861670efcff8406369310b132d7b7 Mon Sep 17 00:00:00 2001 From: Benjamin Pabst Date: Fri, 4 Oct 2024 12:06:07 +0200 Subject: [PATCH 1/3] feat: commit for release --- libs/angular-accelerator/src/lib/utils/criteria.utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/angular-accelerator/src/lib/utils/criteria.utils.ts b/libs/angular-accelerator/src/lib/utils/criteria.utils.ts index 7c9059b2..88dfdf7d 100644 --- a/libs/angular-accelerator/src/lib/utils/criteria.utils.ts +++ b/libs/angular-accelerator/src/lib/utils/criteria.utils.ts @@ -24,7 +24,7 @@ function _hasShowTime(calendars: QueryList, formKey: string): boolean * @param formValues the form values to use * @param calendars a list of primeng calendars of the form (use `@ViewChildren(Calendar) calendars!: QueryList;`) * @param parameters {@link BuildSearchCriteriaParameters} to use when building the search criteria - * @returns the search criteria as partial of T (T = type of the search criteria) + * @returns the search criteria as a partial of T (T = type of the search criteria) */ export function buildSearchCriteria( formValues: FormGroup, From dbaf30f9b96dbdab58f726ade8c425ad1d6d6169 Mon Sep 17 00:00:00 2001 From: Benjamin Pabst Date: Fri, 4 Oct 2024 15:04:41 +0200 Subject: [PATCH 2/3] feat: made name more precise --- libs/angular-accelerator/src/lib/utils/criteria.utils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/angular-accelerator/src/lib/utils/criteria.utils.ts b/libs/angular-accelerator/src/lib/utils/criteria.utils.ts index 88dfdf7d..39a2fe9c 100644 --- a/libs/angular-accelerator/src/lib/utils/criteria.utils.ts +++ b/libs/angular-accelerator/src/lib/utils/criteria.utils.ts @@ -21,22 +21,22 @@ function _hasShowTime(calendars: QueryList, formKey: string): boolean /** * Safely builds the search criteria based on form values - * @param formValues the form values to use + * @param formRawValue the raw value of the form to use * @param calendars a list of primeng calendars of the form (use `@ViewChildren(Calendar) calendars!: QueryList;`) * @param parameters {@link BuildSearchCriteriaParameters} to use when building the search criteria * @returns the search criteria as a partial of T (T = type of the search criteria) */ export function buildSearchCriteria( - formValues: FormGroup, + formRawValue: any, calendars: QueryList, { removeNullValues = false }: BuildSearchCriteriaParameters ) { - return Object.entries(formValues).reduce((acc: Partial, [key, value]) => { + return Object.entries(formRawValue).reduce((acc: Partial, [key, value]) => { if (value == null && removeNullValues) { return acc } if (isValidDate(value) && !_hasShowTime(calendars, key)) { - value = getUTCDateWithoutTimezoneIssues(value); + value = getUTCDateWithoutTimezoneIssues(value) } return { ...acc, From dcda015338bc2cbac5fdc8f3db9f8149fea92d22 Mon Sep 17 00:00:00 2001 From: Benjamin Pabst Date: Fri, 4 Oct 2024 15:09:33 +0200 Subject: [PATCH 3/3] fix: removed import --- libs/angular-accelerator/src/lib/utils/criteria.utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/angular-accelerator/src/lib/utils/criteria.utils.ts b/libs/angular-accelerator/src/lib/utils/criteria.utils.ts index 39a2fe9c..367c0354 100644 --- a/libs/angular-accelerator/src/lib/utils/criteria.utils.ts +++ b/libs/angular-accelerator/src/lib/utils/criteria.utils.ts @@ -1,5 +1,4 @@ import { QueryList } from '@angular/core' -import { FormGroup } from '@angular/forms' import { getUTCDateWithoutTimezoneIssues, isValidDate } from '@onecx/accelerator' import { Calendar } from 'primeng/calendar'