From 0ba2cbc1e89b329a172a031fe7d3f1aa5f6a64a7 Mon Sep 17 00:00:00 2001 From: Boris Waaub Date: Tue, 16 Sep 2025 11:16:57 +0000 Subject: [PATCH] Misc: homepage widget with tickets, and improvements in ticket list --- .../public/page/homepage_widget/index.js | 15 -- .../public/page/homepage_widget/index.ts | 6 + .../public/vuejs/HomepageWidget/App.vue | 154 ++++++------- .../HomepageWidget/MyAccompanyingCourses.vue | 91 ++++---- .../public/vuejs/HomepageWidget/MyCustoms.vue | 206 +++++++++--------- .../vuejs/HomepageWidget/MyEvaluations.vue | 144 +++++++----- .../vuejs/HomepageWidget/MyNotifications.vue | 153 +++++++------ .../public/vuejs/HomepageWidget/MyTasks.vue | 120 +++++----- .../public/vuejs/HomepageWidget/MyTickets.vue | 58 +++++ .../vuejs/HomepageWidget/MyWorkflows.vue | 27 +-- .../vuejs/HomepageWidget/MyWorkflowsTable.vue | 88 ++++---- .../public/vuejs/HomepageWidget/MyWorks.vue | 99 +++++---- .../vuejs/HomepageWidget/TabCounter.vue | 20 +- .../public/vuejs/HomepageWidget/TabTable.vue | 7 +- .../public/vuejs/HomepageWidget/js/i18n.js | 89 -------- .../vuejs/HomepageWidget/store/index.ts | 55 +++++ .../store.js => store/modules/homepage.ts} | 154 +++++++------ .../public/vuejs/PickEntity/PickEntity.vue | 5 +- .../Entity/SearchUserGroupApiProvider.php | 6 +- .../ChillMainBundle/chill.api.specs.yaml | 2 +- .../ChillMainBundle/chill.webpack.config.js | 2 +- .../translations/messages+intl-icu.fr.yaml | 58 +++++ .../Resources/public/types.ts | 69 +++++- .../src/Resources/public/types.ts | 2 + .../components/Comment/CommentComponent.vue | 41 ++-- .../components/Ticket/TicketSelector.vue | 49 +++++ .../vuejs/TicketApp/store/modules/comment.ts | 25 +-- .../TicketApp/store/modules/ticket_list.ts | 5 +- .../Resources/public/vuejs/TicketList/App.vue | 1 - .../DateAndTimeSelectorComponent.vue | 65 ++++++ .../components/TicketFilterListComponent.vue | 184 +++++++++------- .../components/TicketHistoryListComponent.vue | 28 +-- .../src/translations/messages+intl-icu.fr.yml | 10 +- 33 files changed, 1200 insertions(+), 838 deletions(-) delete mode 100644 src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.js create mode 100644 src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.ts create mode 100644 src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyTickets.vue delete mode 100644 src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js create mode 100644 src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/store/index.ts rename src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/{js/store.js => store/modules/homepage.ts} (63%) create mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/Ticket/TicketSelector.vue create mode 100644 src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketList/components/DateAndTimeSelectorComponent.vue diff --git a/src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.js b/src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.js deleted file mode 100644 index 7166c08a0..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import { createApp } from "vue"; -import { _createI18n } from "ChillMainAssets/vuejs/_js/i18n"; -import { appMessages } from "ChillMainAssets/vuejs/HomepageWidget/js/i18n"; -import { store } from "ChillMainAssets/vuejs/HomepageWidget/js/store"; -import App from "ChillMainAssets/vuejs/HomepageWidget/App"; - -const i18n = _createI18n(appMessages); - -const app = createApp({ - template: ``, -}) - .use(store) - .use(i18n) - .component("app", App) - .mount("#homepage_widget"); diff --git a/src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.ts b/src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.ts new file mode 100644 index 000000000..2ac0d85f7 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/page/homepage_widget/index.ts @@ -0,0 +1,6 @@ +import App from "ChillMainAssets/vuejs/HomepageWidget/App.vue"; +import { createApp } from "vue"; +import { store } from "ChillMainAssets/vuejs/HomepageWidget/store"; + +const _app = createApp(App); +_app.use(store).mount("#homepage_widget"); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/App.vue index c550d1c0d..8016266ac 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/App.vue @@ -1,5 +1,5 @@ - diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue index 21fd1a9b7..effea6f35 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyNotifications.vue @@ -1,26 +1,26 @@ - diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabTable.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabTable.vue index d96f88dc5..0ca7ed273 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabTable.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/TabTable.vue @@ -11,11 +11,8 @@ - diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js deleted file mode 100644 index 574854c91..000000000 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js +++ /dev/null @@ -1,89 +0,0 @@ -const appMessages = { - fr: { - main_title: "Vue d'ensemble", - my_works: { - tab: "Mes actions", - description: - "Liste des actions d'accompagnement dont je suis référent et qui arrivent à échéance.", - }, - my_evaluations: { - tab: "Mes évaluations", - description: - "Liste des évaluations dont je suis référent et qui arrivent à échéance.", - }, - my_tasks: { - tab: "Mes tâches", - description_alert: - "Liste des tâches auxquelles je suis assigné et dont la date de rappel est dépassée.", - description_warning: - "Liste des tâches auxquelles je suis assigné et dont la date d'échéance est dépassée.", - }, - my_accompanying_courses: { - tab: "Mes nouveaux parcours", - description: - "Liste des parcours d'accompagnement que l'on vient de m'attribuer depuis moins de 15 jours.", - }, - my_notifications: { - tab: "Mes nouvelles notifications", - description: "Liste des notifications reçues et non lues.", - }, - my_workflows: { - tab: "Mes workflows", - description: "Liste des workflows en attente d'une action.", - description_cc: "Liste des workflows dont je suis en copie.", - }, - opening_date: "Date d'ouverture", - social_issues: "Problématiques sociales", - concerned_persons: "Usagers concernés", - max_date: "Date d'échéance", - warning_date: "Date de rappel", - evaluation: "Évaluation", - task: "Tâche", - Date: "Date", - From: "Expéditeur", - Subject: "Objet", - Entity: "Associé à", - Step: "Étape", - concerned_users: "Usagers concernés", - Object_workflow: "Objet du workflow", - on_hold: "En attente", - show_entity: "Voir {entity}", - the_activity: "l'échange", - the_course: "le parcours", - the_action: "l'action", - the_evaluation: "l'évaluation", - the_evaluation_document: "le document", - the_task: "la tâche", - the_workflow: "le workflow", - StartDate: "Date d'ouverture", - SocialAction: "Action d'accompagnement", - no_data: "Aucun résultats", - no_dashboard: "Pas de tableaux de bord", - counter: { - unread_notifications: - "{n} notification non lue | {n} notifications non lues", - assignated_courses: - "{n} parcours récent assigné | {n} parcours récents assignés", - assignated_actions: "{n} action assignée | {n} actions assignées", - assignated_evaluations: - "{n} évaluation assignée | {n} évaluations assignées", - alert_tasks: "{n} tâche en rappel | {n} tâches en rappel", - warning_tasks: "{n} tâche à échéance | {n} tâches à échéance", - }, - emergency: "Urgent", - confidential: "Confidentiel", - automatic_notification: "Notification automatique", - widget: { - news: { - title: "Actualités", - readMore: "Lire la suite", - date: "Date", - none: "Aucune actualité", - }, - }, - }, -}; - -Object.assign(appMessages.fr); - -export { appMessages }; diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/store/index.ts b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/store/index.ts new file mode 100644 index 000000000..e21c6929a --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/store/index.ts @@ -0,0 +1,55 @@ +import { createStore } from "vuex"; +import { State as HomepageStates, moduleHomepage } from "./modules/homepage"; + +import { + State as TicketListStates, + moduleTicketList, +} from "../../../../../../ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/ticket_list"; +import { + State as TicketStates, + moduleTicket, +} from "../../../../../../ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/ticket"; +import { + State as CommentStates, + moduleComment, +} from "../../../../../../ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/comment"; +import { + moduleMotive, + State as MotiveStates, +} from "../../../../../../ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/motive"; +import { + State as AddresseeStates, + moduleAddressee, +} from "../../../../../../ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/addressee"; +import { + modulePersons, + State as PersonsState, +} from "../../../../../../ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/persons"; + +import { + moduleUser, + State as UserState, +} from "../../../../../../ChillTicketBundle/src/Resources/public/vuejs/TicketApp/store/modules/user"; + +export interface RootState { + homepage: HomepageStates; + motive: MotiveStates; + ticket: TicketStates; + comment: CommentStates; + addressee: AddresseeStates; + persons: PersonsState; + ticketList: TicketListStates; + user: UserState; +} +export const store = createStore({ + modules: { + homepage: moduleHomepage, + motive: moduleMotive, + ticket: moduleTicket, + comment: moduleComment, + addressee: moduleAddressee, + person: modulePersons, + ticketList: moduleTicketList, + user: moduleUser, + }, +}); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/store.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/store/modules/homepage.ts similarity index 63% rename from src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/store.js rename to src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/store/modules/homepage.ts index ed88b857d..776e5cb82 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/store.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/store/modules/homepage.ts @@ -1,90 +1,113 @@ import "es6-promise/auto"; -import { createStore } from "vuex"; -import { makeFetch } from "ChillMainAssets/lib/api/apiMethods"; +import { Module } from "vuex"; +import { + makeFetch, + PaginationResponse, +} from "ChillMainAssets/lib/api/apiMethods"; +import { + AccompanyingCourse, + Alert, + Evaluation, + Warning, + Workflow, + WorflowCc, +} from "ChillPersonAssets/types"; +import { RootState } from ".."; -const debug = process.env.NODE_ENV !== "production"; +export interface TasksState { + warning: PaginationResponse; + alert: PaginationResponse; +} -const isEmpty = (obj) => { - return ( - obj && - Object.keys(obj).length <= 1 && - Object.getPrototypeOf(obj) === Object.prototype - ); -}; +export interface State { + evaluations: PaginationResponse; + tasks: TasksState; + accompanyingCourses: PaginationResponse; + notifications: PaginationResponse; + workflows: PaginationResponse; + workflowsCc: PaginationResponse; + errorMsg: unknown[]; + loading: boolean; + ticketsLoading: boolean; +} -const store = createStore({ - strict: debug, +export const moduleHomepage: Module = { state: { - // works: {}, - evaluations: {}, + evaluations: { + count: 0, + } as PaginationResponse, tasks: { - warning: {}, - alert: {}, + warning: { + count: 0, + } as PaginationResponse, + alert: { + count: 0, + } as PaginationResponse, }, - accompanyingCourses: {}, - notifications: {}, - workflows: {}, - workflowsCc: {}, + accompanyingCourses: { + count: 0, + } as PaginationResponse, + notifications: { + count: 0, + } as PaginationResponse, + workflows: { + count: 0, + } as PaginationResponse, + workflowsCc: { + count: 0, + } as PaginationResponse, + ticketsLoading: false, errorMsg: [], loading: false, }, getters: { - // isWorksLoaded(state) { - // return !isEmpty(state.works); - // }, + isTicketLoading: (state) => { + return state.ticketsLoading; + }, isEvaluationsLoaded(state) { - return !isEmpty(state.evaluations); + return Array.isArray(state.evaluations.results); }, isTasksWarningLoaded(state) { - return !isEmpty(state.tasks.warning); + return Array.isArray(state.tasks.warning.results); }, isTasksAlertLoaded(state) { - return !isEmpty(state.tasks.alert); + return Array.isArray(state.tasks.alert.results); }, isAccompanyingCoursesLoaded(state) { - return !isEmpty(state.accompanyingCourses); + return Array.isArray(state.accompanyingCourses.results); }, isNotificationsLoaded(state) { - return !isEmpty(state.notifications); + return Array.isArray(state.notifications.results); }, isWorkflowsLoaded(state) { - return !isEmpty(state.workflows); + return Array.isArray(state.workflows.results); }, - counter(state) { + counter(state, getters, rootState, rootGetters) { return { - // works: state.works.count, - evaluations: state.evaluations.count, - tasksWarning: state.tasks.warning.count, - tasksAlert: state.tasks.alert.count, - accompanyingCourses: state.accompanyingCourses.count, - notifications: state.notifications.count, - workflows: state.workflows.count, + tickets: rootGetters["ticketList/getCount"] || 0, + evaluations: state.evaluations.count || 0, + tasksWarning: state.tasks.warning.count || 0, + tasksAlert: state.tasks.alert.count || 0, + accompanyingCourses: state.accompanyingCourses.count || 0, + notifications: state.notifications.count || 0, + workflows: state.workflows.count || 0, }; }, }, mutations: { - // addWorks(state, works) { - // //console.log('addWorks', works); - // state.works = works; - // }, addEvaluations(state, evaluations) { - //console.log('addEvaluations', evaluations); state.evaluations = evaluations; }, addTasksWarning(state, tasks) { - //console.log('addTasksWarning', tasks); state.tasks.warning = tasks; }, addTasksAlert(state, tasks) { - //console.log('addTasksAlert', tasks); state.tasks.alert = tasks; }, addCourses(state, courses) { - //console.log('addCourses', courses); state.accompanyingCourses = courses; }, addNotifications(state, notifications) { - //console.log('addNotifications', notifications); state.notifications = notifications; }, addWorkflows(state, workflows) { @@ -96,29 +119,29 @@ const store = createStore({ setLoading(state, bool) { state.loading = bool; }, + setTicketsLoading(state, bool) { + state.ticketsLoading = bool; + }, catchError(state, error) { state.errorMsg.push(error); }, }, actions: { - getByTab({ commit, getters }, { tab, param }) { + async getByTab({ commit, getters, dispatch }, { tab, param }) { switch (tab) { - // case 'MyWorks': - // if (!getters.isWorksLoaded) { - // commit('setLoading', true); - // const url = `/api/1.0/person/accompanying-period/work/my-near-end${'?'+ param}`; - // makeFetch('GET', url) - // .then((response) => { - // commit('addWorks', response); - // commit('setLoading', false); - // }) - // .catch((error) => { - // commit('catchError', error); - // throw error; - // }) - // ; - // } - // break; + case "MyTickets": + if (!getters.isTicketsLoaded) { + commit("setTicketsLoading", true); + // Utilise l'action du module ticket_list + await dispatch( + "fetchTicketList", + { byAddresseeToMe: true }, + { root: true }, + ); + + commit("setTicketsLoading", false); + } + break; case "MyEvaluations": if (!getters.isEvaluationsLoaded) { commit("setLoading", true); @@ -180,7 +203,6 @@ const store = createStore({ const url = `/api/1.0/main/notification/my/unread${"?" + param}`; makeFetch("GET", url) .then((response) => { - console.log("notifications", response); commit("addNotifications", response); commit("setLoading", false); }) @@ -217,6 +239,4 @@ const store = createStore({ } }, }, -}); - -export { store }; +}; diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue index 8e96a1595..98c0d0034 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue @@ -46,10 +46,7 @@ -
    +
    • userGroupRepository->provideSearchApiQuery($pattern, $this->getLocale(), 'user-group'); + return $this->userGroupRepository->provideSearchApiQuery($pattern, $this->getLocale(), 'user_group'); } public function supportsResult(string $key, array $metadatas): bool { - return 'user-group' === $key; + return 'user_group' === $key; } public function supportsTypes(string $pattern, array $types, array $parameters): bool { - return in_array('user-group', $types, true); + return in_array('user_group', $types, true); } } diff --git a/src/Bundle/ChillMainBundle/chill.api.specs.yaml b/src/Bundle/ChillMainBundle/chill.api.specs.yaml index 047f69675..5054af4d8 100644 --- a/src/Bundle/ChillMainBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillMainBundle/chill.api.specs.yaml @@ -305,7 +305,7 @@ paths: - thirdparty - user - household - - user-group + - user_group responses: 200: description: "OK" diff --git a/src/Bundle/ChillMainBundle/chill.webpack.config.js b/src/Bundle/ChillMainBundle/chill.webpack.config.js index 011fc9559..feabedd07 100644 --- a/src/Bundle/ChillMainBundle/chill.webpack.config.js +++ b/src/Bundle/ChillMainBundle/chill.webpack.config.js @@ -26,7 +26,7 @@ module.exports = function (encore, entries) { ); encore.addEntry( "page_homepage_widget", - __dirname + "/Resources/public/page/homepage_widget/index.js", + __dirname + "/Resources/public/page/homepage_widget/index.ts", ); encore.addEntry( "page_export", diff --git a/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml index 15bc7a84e..6b893410a 100644 --- a/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml @@ -191,3 +191,61 @@ pick_entity: one {Tiers} other {Tiers} } + +loading: "Chargement..." +main_title: "Vue d'ensemble" +my_tickets.tab: "Mes Tickets" +my_works.tab: "Mes actions" +my_works.description: "Liste des actions d'accompagnement dont je suis référent et qui arrivent à échéance." +my_evaluations.tab: "Mes évaluations" +my_evaluations.description: "Liste des évaluations dont je suis référent et qui arrivent à échéance." +my_tasks.tab: "Mes tâches" +my_tasks.description_alert: "Liste des tâches auxquelles je suis assigné et dont la date de rappel est dépassée." +my_tasks.description_warning: "Liste des tâches auxquelles je suis assigné et dont la date d'échéance est dépassée." +my_accompanying_courses.tab: "Mes nouveaux parcours" +my_accompanying_courses.description: "Liste des parcours d'accompagnement que l'on vient de m'attribuer depuis moins de 15 jours." +my_notifications.tab: "Mes nouvelles notifications" +my_notifications.description: "Liste des notifications reçues et non lues." +my_workflows.tab: "Mes workflows" +my_workflows.description: "Liste des workflows en attente d'une action." +my_workflows.description_cc: "Liste des workflows dont je suis en copie." +opening_date: "Date d'ouverture" +social_issues: "Problématiques sociales" +concerned_persons: "Usagers concernés" +max_date: "Date d'échéance" +warning_date: "Date de rappel" +evaluation: "Évaluation" +task: "Tâche" +Date: "Date" +From: "Expéditeur" +Subject: "Objet" +Entity: "Associé à" +Step: "Étape" +concerned_users: "Usagers concernés" +Object_workflow: "Objet du workflow" +on_hold: "En attente" +show_entity: "Voir {entity}" +the_activity: "l'échange" +the_course: "le parcours" +the_action: "l'action" +the_evaluation: "l'évaluation" +the_evaluation_document: "le document" +the_task: "la tâche" +the_workflow: "le workflow" +StartDate: "Date d'ouverture" +SocialAction: "Action d'accompagnement" +no_data: "Aucun résultats" +no_dashboard: "Pas de tableaux de bord" +counter.unread_notifications: "{n, plural, one {# notification non lue} other {# notifications non lues}}" +counter.assignated_courses: "{n, plural, one {# parcours récent assigné} other {# parcours récents assignés}}" +counter.assignated_actions: "{n, plural, one {# action assignée} other {# actions assignées}}" +counter.assignated_evaluations: "{n, plural, one {# évaluation assignée} other {# évaluations assignées}}" +counter.alert_tasks: "{n, plural, one {# tâche en rappel} other {# tâches en rappel}}" +counter.warning_tasks: "{n, plural, one {# tâche à échéance} other {# tâches à échéance}}" +emergency: "Urgent" +confidential: "Confidentiel" +automatic_notification: "Notification automatique" +widget.news.title: "Actualités" +widget.news.readMore: "Lire la suite" +widget.news.date: "Date" +widget.news.none: "Aucune actualité" diff --git a/src/Bundle/ChillPersonBundle/Resources/public/types.ts b/src/Bundle/ChillPersonBundle/Resources/public/types.ts index 32dc24f73..a4c07e85a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/types.ts +++ b/src/Bundle/ChillPersonBundle/Resources/public/types.ts @@ -14,12 +14,12 @@ import { import { StoredObject } from "ChillDocStoreAssets/types"; import { Thirdparty } from "../../../ChillThirdPartyBundle/Resources/public/types"; import { Calendar } from "../../../ChillCalendarBundle/Resources/public/types"; +import Person from "./vuejs/_components/OnTheFly/Person.vue"; export interface AltName { label: string; key: string; } - export interface Person { id: number; type: "person"; @@ -45,6 +45,7 @@ export interface Person { export interface AccompanyingPeriod { id: number; + type: "accompanying_period"; addressLocation?: Address | null; administrativeLocation?: Location | null; calendars: Calendar[]; @@ -81,6 +82,7 @@ export interface AccompanyingPeriod { export interface AccompanyingPeriodWork { id: number; + type: "accompanying_period_work"; accompanyingPeriod?: AccompanyingPeriod; accompanyingPeriodWorkEvaluations: AccompanyingPeriodWorkEvaluation[]; createdAt?: string; @@ -105,6 +107,7 @@ export interface AccompanyingPeriodWork { export interface SocialAction { id: number; + text: string; parent?: SocialAction | null; children: SocialAction[]; issue?: SocialIssue | null; @@ -166,6 +169,7 @@ export interface AccompanyingPeriodLocationHistory { export interface SocialIssue { id: number; + text: string; parent?: SocialIssue | null; children: SocialIssue[]; socialActions?: SocialAction[] | null; @@ -206,6 +210,7 @@ export interface AccompanyingPeriodWorkGoal { } export interface AccompanyingPeriodWorkEvaluation { + type: "accompanying_period_work_evaluation"; accompanyingPeriodWork: AccompanyingPeriodWork | null; comment: string; createdAt: DateTime | null; @@ -236,6 +241,68 @@ export interface Evaluation { notificationDelay: string; } +export interface Step { + currentStep: { + text: string; + }; +} + +export interface Workflow { + id: number; + title: string; + type: "accompanying_period_work" | "accompanying_period"; + isOnHoldAtCurrentStep: boolean; + datas: { + persons: Person[]; + }; + steps: Step[]; +} + +export interface WorflowCc { + id: number; + title: string; + isOnHoldAtCurrentStep: boolean; + datas: { + persons: Person[]; + }; + steps: Step[]; +} + +export interface Warning { + id: number; + warningDate: DateTime; + endDate: DateTime; + title: string; +} +export interface Alert { + id: number; + warningDate: DateTime; + endDate: DateTime; + title: string; +} + +export interface Notification { + id: number; + date: DateTime; + title: string; + sender: { + text: string; + }; + relatedEntityClass: string; + relatedEntityId: number; +} +export interface Participation { + person: Person; +} +export interface AccompanyingCourse { + id: number; + openingDate: DateTime; + socialIssues: SocialIssue[]; + participations: Participation[]; + emergency: boolean; + confidential: boolean; +} + export interface AccompanyingPeriodWorkReferrerHistory { id: number; accompanyingPeriodWork: AccompanyingPeriodWork; diff --git a/src/Bundle/ChillTicketBundle/src/Resources/public/types.ts b/src/Bundle/ChillTicketBundle/src/Resources/public/types.ts index 331522e05..42e0aff81 100644 --- a/src/Bundle/ChillTicketBundle/src/Resources/public/types.ts +++ b/src/Bundle/ChillTicketBundle/src/Resources/public/types.ts @@ -165,6 +165,7 @@ export interface TicketFilters { byCreatedBefore: string; byResponseTimeExceeded: boolean; byAddresseeToMe: boolean; + byTicketId: number | null; } export interface TicketFilterParams { @@ -179,6 +180,7 @@ export interface TicketFilterParams { byCreatedBefore?: string; byResponseTimeExceeded?: string; byAddresseeToMe?: boolean; + byTicketId?: number; } export interface TicketInitForm { diff --git a/src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/Comment/CommentComponent.vue b/src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/Comment/CommentComponent.vue index 215adc58b..2e63a5bdc 100644 --- a/src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/Comment/CommentComponent.vue +++ b/src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/components/Comment/CommentComponent.vue @@ -1,20 +1,11 @@