From 0204bdd38dee0334fb86ce4942c0eda4fe57c8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 9 Jul 2025 17:46:16 +0200 Subject: [PATCH] Restore features after merging --- .../public/vuejs/PickEntity/PickEntity.vue | 142 ++-- .../Resources/public/types.ts | 331 ++++---- .../public/vuejs/_components/AddPersons.vue | 720 +++++++++--------- 3 files changed, 605 insertions(+), 588 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue index 39268372b..639f3c59f 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue @@ -1,14 +1,18 @@ @@ -291,7 +317,7 @@ ul.badge-suggest li > span.thirdparty { border-bottom-color: rgb(198.9, 72, 98.1); } .current-user { - color: var(--bs-body-color); - background-color: var(--bs-chill-l-gray) !important; + color: var(--bs-body-color); + background-color: var(--bs-chill-l-gray) !important; } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/types.ts b/src/Bundle/ChillPersonBundle/Resources/public/types.ts index 09e2ebb69..32dc24f73 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/types.ts +++ b/src/Bundle/ChillPersonBundle/Resources/public/types.ts @@ -1,4 +1,3 @@ -import { StoredObject } from "ChillDocStoreAssets/types"; import { Address, Center, @@ -9,8 +8,8 @@ import { Household, WorkflowAvailable, Scope, - Job, - PrivateCommentEmbeddable, + Job, + PrivateCommentEmbeddable, } from "ChillMainAssets/types"; import { StoredObject } from "ChillDocStoreAssets/types"; import { Thirdparty } from "../../../ChillThirdPartyBundle/Resources/public/types"; @@ -45,208 +44,208 @@ export interface Person { } export interface AccompanyingPeriod { - id: number; - addressLocation?: Address | null; - administrativeLocation?: Location | null; - calendars: Calendar[]; - closingDate?: Date | null; - closingMotive?: ClosingMotive | null; - comments: Comment[]; - confidential: boolean; - createdAt?: Date | null; - createdBy?: User | null; - emergency: boolean; - intensity?: "occasional" | "regular"; - job?: Job | null; - locationHistories: AccompanyingPeriodLocationHistory[]; - openingDate?: Date | null; - origin?: Origin | null; - participations: AccompanyingPeriodParticipation[]; - personLocation?: Person | null; - pinnedComment?: Comment | null; - preventUserIsChangedNotification: boolean; - remark: string; - requestorAnonymous: boolean; - requestorPerson?: Person | null; - requestorThirdParty?: Thirdparty | null; - resources: AccompanyingPeriodResource[]; - scopes: Scope[]; - socialIssues: SocialIssue[]; - step?: - | "CLOSED" - | "CONFIRMED" - | "CONFIRMED_INACTIVE_SHORT" - | "CONFIRMED_INACTIVE_LONG" - | "DRAFT"; + id: number; + addressLocation?: Address | null; + administrativeLocation?: Location | null; + calendars: Calendar[]; + closingDate?: Date | null; + closingMotive?: ClosingMotive | null; + comments: Comment[]; + confidential: boolean; + createdAt?: Date | null; + createdBy?: User | null; + emergency: boolean; + intensity?: "occasional" | "regular"; + job?: Job | null; + locationHistories: AccompanyingPeriodLocationHistory[]; + openingDate?: Date | null; + origin?: Origin | null; + participations: AccompanyingPeriodParticipation[]; + personLocation?: Person | null; + pinnedComment?: Comment | null; + preventUserIsChangedNotification: boolean; + remark: string; + requestorAnonymous: boolean; + requestorPerson?: Person | null; + requestorThirdParty?: Thirdparty | null; + resources: AccompanyingPeriodResource[]; + scopes: Scope[]; + socialIssues: SocialIssue[]; + step?: + | "CLOSED" + | "CONFIRMED" + | "CONFIRMED_INACTIVE_SHORT" + | "CONFIRMED_INACTIVE_LONG" + | "DRAFT"; } export interface AccompanyingPeriodWork { - id: number; - accompanyingPeriod?: AccompanyingPeriod; - accompanyingPeriodWorkEvaluations: AccompanyingPeriodWorkEvaluation[]; - createdAt?: string; - createdAutomatically: boolean; - createdAutomaticallyReason: string; - createdBy: User; - endDate?: string; - goals: AccompanyingPeriodWorkGoal[]; - handlingThierParty?: Thirdparty; - note: string; - persons: Person[]; - privateComment: PrivateCommentEmbeddable; - referrersHistory: AccompanyingPeriodWorkReferrerHistory[]; - results: Result[]; - socialAction?: SocialAction; - startDate?: string; - thirdParties: Thirdparty[]; - updatedAt?: string; - updatedBy: User; - version: number; + id: number; + accompanyingPeriod?: AccompanyingPeriod; + accompanyingPeriodWorkEvaluations: AccompanyingPeriodWorkEvaluation[]; + createdAt?: string; + createdAutomatically: boolean; + createdAutomaticallyReason: string; + createdBy: User; + endDate?: string; + goals: AccompanyingPeriodWorkGoal[]; + handlingThierParty?: Thirdparty; + note: string; + persons: Person[]; + privateComment: PrivateCommentEmbeddable; + referrersHistory: AccompanyingPeriodWorkReferrerHistory[]; + results: Result[]; + socialAction?: SocialAction; + startDate?: string; + thirdParties: Thirdparty[]; + updatedAt?: string; + updatedBy: User; + version: number; } export interface SocialAction { - id: number; - parent?: SocialAction | null; - children: SocialAction[]; - issue?: SocialIssue | null; - ordering: number; - title: { - fr: string; - }; - defaultNotificationDelay?: string | null; - desactivationDate?: string | null; - evaluations: Evaluation[]; - goals: Goal[]; - results: Result[]; + id: number; + parent?: SocialAction | null; + children: SocialAction[]; + issue?: SocialIssue | null; + ordering: number; + title: { + fr: string; + }; + defaultNotificationDelay?: string | null; + desactivationDate?: string | null; + evaluations: Evaluation[]; + goals: Goal[]; + results: Result[]; } export interface AccompanyingPeriodResource { - id: number; - accompanyingPeriod: AccompanyingPeriod; - comment?: string | null; - person?: Person | null; - thirdParty?: Thirdparty | null; + id: number; + accompanyingPeriod: AccompanyingPeriod; + comment?: string | null; + person?: Person | null; + thirdParty?: Thirdparty | null; } export interface Origin { - id: number; - label: { - fr: string; - }; - noActiveAfter: DateTime; + id: number; + label: { + fr: string; + }; + noActiveAfter: DateTime; } export interface ClosingMotive { - id: number; - active: boolean; - name: { - fr: string; - }; - ordering: number; - isCanceledAccompanyingPeriod: boolean; - parent?: ClosingMotive | null; - children: ClosingMotive[]; + id: number; + active: boolean; + name: { + fr: string; + }; + ordering: number; + isCanceledAccompanyingPeriod: boolean; + parent?: ClosingMotive | null; + children: ClosingMotive[]; } export interface AccompanyingPeriodParticipation { - id: number; - startDate: DateTime; - endDate?: DateTime | null; - accompanyingPeriod: AccompanyingPeriod; - person: Person; + id: number; + startDate: DateTime; + endDate?: DateTime | null; + accompanyingPeriod: AccompanyingPeriod; + person: Person; } export interface AccompanyingPeriodLocationHistory { - id: number; - startDate: DateTime; - endDate?: DateTime | null; - addressLocation?: Address | null; - period: AccompanyingPeriod; - personLocation?: Person | null; + id: number; + startDate: DateTime; + endDate?: DateTime | null; + addressLocation?: Address | null; + period: AccompanyingPeriod; + personLocation?: Person | null; } export interface SocialIssue { - id: number; - parent?: SocialIssue | null; - children: SocialIssue[]; - socialActions?: SocialAction[] | null; - ordering: number; - title: { - fr: string; - }; - desactivationDate?: string | null; + id: number; + parent?: SocialIssue | null; + children: SocialIssue[]; + socialActions?: SocialAction[] | null; + ordering: number; + title: { + fr: string; + }; + desactivationDate?: string | null; } export interface Goal { - id: number; - results: Result[]; - socialActions?: SocialAction[] | null; - title: { - fr: string; - }; + id: number; + results: Result[]; + socialActions?: SocialAction[] | null; + title: { + fr: string; + }; } export interface Result { - id: number; - accompanyingPeriodWorks: AccompanyingPeriodWork[]; - accompanyingPeriodWorkGoals: AccompanyingPeriodWorkGoal[]; - goals: Goal[]; - socialActions: SocialAction[]; - title: { - fr: string; - }; - desactivationDate?: string | null; + id: number; + accompanyingPeriodWorks: AccompanyingPeriodWork[]; + accompanyingPeriodWorkGoals: AccompanyingPeriodWorkGoal[]; + goals: Goal[]; + socialActions: SocialAction[]; + title: { + fr: string; + }; + desactivationDate?: string | null; } export interface AccompanyingPeriodWorkGoal { - id: number; - accompanyingPeriodWork: AccompanyingPeriodWork; - goal: Goal; - note: string; - results: Result[]; + id: number; + accompanyingPeriodWork: AccompanyingPeriodWork; + goal: Goal; + note: string; + results: Result[]; } export interface AccompanyingPeriodWorkEvaluation { - accompanyingPeriodWork: AccompanyingPeriodWork | null; - comment: string; - createdAt: DateTime | null; - createdBy: User | null; - documents: AccompanyingPeriodWorkEvaluationDocument[]; - endDate: DateTime | null; - evaluation: Evaluation | null; - id: number | null; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - key: any; - maxDate: DateTime | null; - startDate: DateTime | null; - updatedAt: DateTime | null; - updatedBy: User | null; - warningInterval: string | null; - timeSpent: number | null; + accompanyingPeriodWork: AccompanyingPeriodWork | null; + comment: string; + createdAt: DateTime | null; + createdBy: User | null; + documents: AccompanyingPeriodWorkEvaluationDocument[]; + endDate: DateTime | null; + evaluation: Evaluation | null; + id: number | null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + key: any; + maxDate: DateTime | null; + startDate: DateTime | null; + updatedAt: DateTime | null; + updatedBy: User | null; + warningInterval: string | null; + timeSpent: number | null; } export interface Evaluation { - id: number; - url: string; - socialActions: SocialAction[]; - title: { - fr: string; - }; - active: boolean; - delay: string; - notificationDelay: string; + id: number; + url: string; + socialActions: SocialAction[]; + title: { + fr: string; + }; + active: boolean; + delay: string; + notificationDelay: string; } export interface AccompanyingPeriodWorkReferrerHistory { - id: number; - accompanyingPeriodWork: AccompanyingPeriodWork; - user: User; - startDate: DateTime; - endDate: DateTime | null; - createdAt: DateTime; - updatedAt: DateTime | null; - createdBy: User; - updatedBy: User | null; + id: number; + accompanyingPeriodWork: AccompanyingPeriodWork; + user: User; + startDate: DateTime; + endDate: DateTime | null; + createdAt: DateTime; + updatedAt: DateTime | null; + createdBy: User; + updatedBy: User | null; } export interface AccompanyingPeriodWorkEvaluationDocument { @@ -276,14 +275,16 @@ export type Entities = (UserGroup | User | Person | Thirdparty | Household) & { profession?: string; }; -export type Result = Entities & { +export type EntitiesOrMe = "me" | Entities; + +export type AddPersonResult = Entities & { parent?: Entities | null; }; export interface Suggestion { key: string; relevance: number; - result: Result; + result: AddPersonResult; } export interface SearchPagination { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index c8383bf9c..24cdca24e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -1,131 +1,124 @@ + + + + + +