From 368e75c10ae53d19984d0640626dbf239a0681a8 Mon Sep 17 00:00:00 2001 From: enkhtuvshinD <87625210+enkhtuvshinD@users.noreply.github.com> Date: Tue, 10 Oct 2023 17:17:57 +0800 Subject: [PATCH] fix(meetings): bug fixes after test cases (#364) --- .../src/models/Meetings.ts | 3 +- .../src/components/List.tsx | 76 +++++----------- .../src/components/myCalendar/SideBar.tsx | 2 +- .../components/myCalendar/meeting/Detail.tsx | 31 +++++++ .../components/myCalendar/meeting/Form.tsx | 14 +-- .../src/components/myMeetings/MyMeetings.tsx | 87 +++++++++++++++++++ .../src/components/myMeetings/Row.tsx | 6 +- .../src/containers/myMeetings/List.tsx | 4 +- .../plugin-meetings-ui/src/graphql/queries.ts | 2 + packages/plugin-meetings-ui/src/routes.tsx | 30 ++++++- 10 files changed, 186 insertions(+), 69 deletions(-) create mode 100644 packages/plugin-meetings-ui/src/components/myMeetings/MyMeetings.tsx diff --git a/packages/plugin-meetings-api/src/models/Meetings.ts b/packages/plugin-meetings-api/src/models/Meetings.ts index 56370e0147..b704db50e3 100644 --- a/packages/plugin-meetings-api/src/models/Meetings.ts +++ b/packages/plugin-meetings-api/src/models/Meetings.ts @@ -53,8 +53,7 @@ export const loadMeetingClass = (model: IModels) => { } const result = await model.Meetings.findOne({ _id: doc._id, - createdBy: user._id, - status: { $ne: 'completed' } + createdBy: user._id }); if (result) { await model.Meetings.updateOne( diff --git a/packages/plugin-meetings-ui/src/components/List.tsx b/packages/plugin-meetings-ui/src/components/List.tsx index 9fbf196f48..25bc522db2 100755 --- a/packages/plugin-meetings-ui/src/components/List.tsx +++ b/packages/plugin-meetings-ui/src/components/List.tsx @@ -2,7 +2,6 @@ import Button from '@erxes/ui/src/components/Button'; import { __, router } from '@erxes/ui/src/utils'; import React, { useEffect, useState } from 'react'; import MeetingFormContainer from '../containers/myCalendar/meeting/Form'; -import MyMeetingListContainer from '../containers/myMeetings/List'; import { Title } from '@erxes/ui-settings/src/styles'; import ModalTrigger from '@erxes/ui/src/components/ModalTrigger'; import Wrapper from '@erxes/ui/src/layout/components/Wrapper'; @@ -11,10 +10,9 @@ import DataWithLoader from '@erxes/ui/src/components/DataWithLoader'; import { menuMeeting } from '../contants'; import { MyCalendarList } from './myCalendar/MyCalendar'; import SideBar from '../containers/myCalendar/SideBar'; -import SideBarContainer from '../containers/myMeetings/SideBar'; import { IUser } from '@erxes/ui/src/auth/types'; -import { FormControl } from '@erxes/ui/src/components'; import { MeetingsQueryResponse } from '../types'; +import MyMeetings from './myMeetings/MyMeetings'; type Props = { meetings: any; @@ -36,28 +34,17 @@ function List(props: Props) { currentUser, meetingQuery } = props; - const { meetingId, searchValue } = queryParams; + const { meetingId } = queryParams; const [component, setComponent] = useState(
); const [leftSideBar, setLeftSideBar] = useState(); - const [searchText, setSearchValue] = useState(searchValue); - const routePath = location.pathname.split('/').slice(-1)[0]; useEffect(() => { switch (routePath) { case 'myMeetings': - setComponent( -