From 23369197e7de1e22a71eb7ed588eeeebe115cf28 Mon Sep 17 00:00:00 2001 From: Boris Waaub Date: Wed, 4 Feb 2026 14:48:33 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20des=20types=20et=20am=C3=A9liorati?= =?UTF-8?q?on=20de=20la=20gestion=20des=20erreurs=20dans=20les=20composant?= =?UTF-8?q?s=20ThirdParty=20et=20ThirdPartyEdit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/public/types.ts | 12 ++++---- .../Resources/public/types.ts | 7 ++++- .../vuejs/_components/OnTheFly/ThirdParty.vue | 8 +----- .../_components/OnTheFly/ThirdPartyEdit.vue | 28 +++++++++---------- 4 files changed, 26 insertions(+), 29 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/types.ts b/src/Bundle/ChillPersonBundle/Resources/public/types.ts index 71906cfb3..5b3b04542 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/types.ts +++ b/src/Bundle/ChillPersonBundle/Resources/public/types.ts @@ -308,7 +308,7 @@ export interface AccompanyingPeriodWorkEvaluation { documents: AccompanyingPeriodWorkEvaluationDocument[]; endDate: DateTime | null; evaluation: Evaluation | null; - id: number | null; + id: number; // eslint-disable-next-line @typescript-eslint/no-explicit-any key: any; maxDate: DateTime | null; @@ -445,31 +445,31 @@ export type EntitiesOrMe = "me" | Entities; export function isSuggestionForUserGroup( s: Suggestion, ): s is Suggestion & { result: UserGroup } { - return (s as any)?.result?.type === "user_group"; + return (s as Suggestion)?.result?.type === "user_group"; } export function isSuggestionForUser( s: Suggestion, ): s is Suggestion & { result: User } { - return (s as any)?.result?.type === "user"; + return (s as Suggestion)?.result?.type === "user"; } export function isSuggestionForPerson( s: Suggestion, ): s is Suggestion & { result: Person } { - return (s as any)?.result?.type === "person"; + return (s as Suggestion)?.result?.type === "person"; } export function isSuggestionForThirdParty( s: Suggestion, ): s is Suggestion & { result: Thirdparty } { - return (s as any)?.result?.type === "thirdparty"; + return (s as Suggestion)?.result?.type === "thirdparty"; } export function isSuggestionForHousehold( s: Suggestion, ): s is Suggestion & { result: Household } { - return (s as any)?.result?.type === "household"; + return (s as Suggestion)?.result?.type === "household"; } export type AddPersonResult = Entities & { diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/types.ts b/src/Bundle/ChillThirdPartyBundle/Resources/public/types.ts index 98524cfe1..644e03fa2 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/types.ts +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/types.ts @@ -1,6 +1,5 @@ import { Address, - Center, Civility, DateTime, SetAddress, @@ -8,6 +7,12 @@ import { User, } from "ChillMainAssets/types"; +declare global { + interface Window { + addaddress: Record; + } +} + export type ThirdPartyKind = "contact" | "child" | "company"; export interface BaseThirdParty { diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue index 0a83f1b3b..301e7ed70 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -20,13 +20,7 @@ action === 'edit' || action === 'create' || action === 'addContact' " > - + diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdPartyEdit.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdPartyEdit.vue index cb3d93ea2..f22bb670d 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdPartyEdit.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdPartyEdit.vue @@ -41,7 +41,7 @@ -
+

Contact de :

{{ err }}
@@ -191,6 +192,7 @@
{{ err }}
@@ -238,6 +240,7 @@
{{ err }}
@@ -266,6 +269,7 @@
{{ err }}
@@ -294,6 +298,7 @@
{{ err }}
@@ -315,7 +320,7 @@