From f33c6e1fbbf9e746441aec19e675e3132a84e3c3 Mon Sep 17 00:00:00 2001
From: Pavel Denisjuk <pavel@webiny.com>
Date: Mon, 18 Nov 2024 11:25:35 +0100
Subject: [PATCH] fix(app-aco): use FormInvalidFields type

---
 .../QueryBuilderDrawer/QueryBuilderDrawerPresenter.ts         | 4 ++--
 .../QuerySaverDialog/QuerySaverDialogPresenter.ts             | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/packages/app-aco/src/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawerPresenter.ts b/packages/app-aco/src/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawerPresenter.ts
index 3a5f7427949..43467c3ab43 100644
--- a/packages/app-aco/src/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawerPresenter.ts
+++ b/packages/app-aco/src/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawerPresenter.ts
@@ -1,6 +1,6 @@
 import { makeAutoObservable } from "mobx";
-
 import { Filter, FilterDTO, FilterGroupDTO, FilterGroupFilterDTO, Operation } from "../domain";
+import { FormInvalidFields } from "@webiny/form";
 
 export interface QueryBuilderDrawerPresenterInterface {
     load(filter: FilterDTO): void;
@@ -18,7 +18,7 @@ export interface QueryBuilderDrawerPresenterInterface {
 export interface QueryBuilderViewModel {
     name: string;
     description: string;
-    invalidFields: Record<string, { isValid: boolean; message: string }>;
+    invalidFields: FormInvalidFields;
     invalidMessage: string;
     data: QueryBuilderFormData;
 }
diff --git a/packages/app-aco/src/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialogPresenter.ts b/packages/app-aco/src/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialogPresenter.ts
index 887e0b926c7..334e989e5c2 100644
--- a/packages/app-aco/src/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialogPresenter.ts
+++ b/packages/app-aco/src/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialogPresenter.ts
@@ -1,6 +1,7 @@
 import { makeAutoObservable } from "mobx";
 
 import { Filter, FilterDTO } from "../domain";
+import { FormInvalidFields } from "@webiny/form";
 
 export interface QuerySaverDialogPresenterInterface {
     load(filter: FilterDTO): void;
@@ -25,7 +26,7 @@ export interface QuerySaverDialogFormData {
 
 export interface QuerySaverDialogViewModel {
     filter: FilterDTO | undefined;
-    invalidFields: Record<string, { isValid: boolean; message: string }>;
+    invalidFields: FormInvalidFields;
 }
 
 export class QuerySaverDialogPresenter implements QuerySaverDialogPresenterInterface {