From b6792c615fce21bd547c4ad48693e99d40f5ef84 Mon Sep 17 00:00:00 2001 From: aykhanahmadli Date: Thu, 14 Nov 2024 17:20:10 +0100 Subject: [PATCH 1/2] wip: investigate 404 --- .../features/invited-participants/ManageParticipants.tsx | 6 ++++++ .../app/src/features/waiting-room/waiting-room.queries.ts | 3 +++ 2 files changed, 9 insertions(+) diff --git a/packages/telemed-intake/app/src/features/invited-participants/ManageParticipants.tsx b/packages/telemed-intake/app/src/features/invited-participants/ManageParticipants.tsx index a6bd82fe..ebda0342 100644 --- a/packages/telemed-intake/app/src/features/invited-participants/ManageParticipants.tsx +++ b/packages/telemed-intake/app/src/features/invited-participants/ManageParticipants.tsx @@ -3,12 +3,18 @@ import { FC } from 'react'; import { useGetVideoChatInvites } from '../waiting-room'; import { InviteParticipantForm } from './InviteParticipantForm'; import { InvitedParticipantList } from './InvitedParticipantList'; +import { useZapEHRAPIClient } from 'src/utils'; +import { useAppointmentStore } from '../appointments'; interface ManageParticipantsProps { onClose?: () => void; } export const ManageParticipants: FC = ({ onClose }) => { + const { appointmentID } = useAppointmentStore(); + console.log('appointmentID', appointmentID); + const apiClient = useZapEHRAPIClient(); + console.log('apiClient', apiClient); const { data: invitesData, isLoading, isFetching } = useGetVideoChatInvites(); const invitedParticipants = invitesData?.invites ?? []; diff --git a/packages/telemed-intake/app/src/features/waiting-room/waiting-room.queries.ts b/packages/telemed-intake/app/src/features/waiting-room/waiting-room.queries.ts index 36bdb403..64191b42 100644 --- a/packages/telemed-intake/app/src/features/waiting-room/waiting-room.queries.ts +++ b/packages/telemed-intake/app/src/features/waiting-room/waiting-room.queries.ts @@ -39,6 +39,9 @@ export const useGetVideoChatInvites = () => { const apiClient = useZapEHRAPIClient(); const appointmentID = useAppointmentStore((state) => state.appointmentID); + console.log('appointmentID', appointmentID); + console.log('apiClient', apiClient); + return useQuery( ['video-chat-list-invites', appointmentID], () => { From b11e5de45c5fccf767ad4c7270ca8af0a2153298 Mon Sep 17 00:00:00 2001 From: aykhanahmadli Date: Thu, 14 Nov 2024 18:55:13 +0100 Subject: [PATCH 2/2] fix for video chat invite 404 error --- .../features/invited-participants/ManageParticipants.tsx | 6 ------ .../app/src/features/waiting-room/waiting-room.queries.ts | 3 --- packages/telemed-intake/zambdas/scripts/setup.ts | 2 ++ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/telemed-intake/app/src/features/invited-participants/ManageParticipants.tsx b/packages/telemed-intake/app/src/features/invited-participants/ManageParticipants.tsx index ebda0342..a6bd82fe 100644 --- a/packages/telemed-intake/app/src/features/invited-participants/ManageParticipants.tsx +++ b/packages/telemed-intake/app/src/features/invited-participants/ManageParticipants.tsx @@ -3,18 +3,12 @@ import { FC } from 'react'; import { useGetVideoChatInvites } from '../waiting-room'; import { InviteParticipantForm } from './InviteParticipantForm'; import { InvitedParticipantList } from './InvitedParticipantList'; -import { useZapEHRAPIClient } from 'src/utils'; -import { useAppointmentStore } from '../appointments'; interface ManageParticipantsProps { onClose?: () => void; } export const ManageParticipants: FC = ({ onClose }) => { - const { appointmentID } = useAppointmentStore(); - console.log('appointmentID', appointmentID); - const apiClient = useZapEHRAPIClient(); - console.log('apiClient', apiClient); const { data: invitesData, isLoading, isFetching } = useGetVideoChatInvites(); const invitedParticipants = invitesData?.invites ?? []; diff --git a/packages/telemed-intake/app/src/features/waiting-room/waiting-room.queries.ts b/packages/telemed-intake/app/src/features/waiting-room/waiting-room.queries.ts index 64191b42..36bdb403 100644 --- a/packages/telemed-intake/app/src/features/waiting-room/waiting-room.queries.ts +++ b/packages/telemed-intake/app/src/features/waiting-room/waiting-room.queries.ts @@ -39,9 +39,6 @@ export const useGetVideoChatInvites = () => { const apiClient = useZapEHRAPIClient(); const appointmentID = useAppointmentStore((state) => state.appointmentID); - console.log('appointmentID', appointmentID); - console.log('apiClient', apiClient); - return useQuery( ['video-chat-list-invites', appointmentID], () => { diff --git a/packages/telemed-intake/zambdas/scripts/setup.ts b/packages/telemed-intake/zambdas/scripts/setup.ts index 49a01fde..cf5101d1 100644 --- a/packages/telemed-intake/zambdas/scripts/setup.ts +++ b/packages/telemed-intake/zambdas/scripts/setup.ts @@ -26,6 +26,8 @@ async function createApplication( 'Zambda:Function:telemed-create-paperwork', 'Zambda:Function:telemed-cancel-telemed-appointment', 'Zambda:Function:telemed-cancel-in-person-appointment', + 'Zambda:Function:telemed-video-chat-invites-list', + 'Zambda:Function:telemed-video-chat-invites-create', ], action: ['Zambda:InvokeFunction'], effect: 'Allow',