Skip to content

Commit

Permalink
ticketUUID is undefined in call for update
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Dec 6, 2024
1 parent 286ff1b commit 621f92d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/people/widgetViews/PhasePlannerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const PhasePlannerView: React.FC = () => {
}
};

socket.onmessage = (event: MessageEvent) => {
socket.onmessage = async (event: MessageEvent) => {
try {
const data = JSON.parse(event.data);

Expand All @@ -82,8 +82,6 @@ const PhasePlannerView: React.FC = () => {

const ticketMessage = data as TicketMessage;

console.log('Ticket Message', ticketMessage);

switch (ticketMessage.action) {
case 'message':
console.log('Received ticket message:', ticketMessage.message);
Expand All @@ -96,8 +94,8 @@ const PhasePlannerView: React.FC = () => {
break;

case 'process':
console.log('Processing ticket update:', ticketMessage.ticketDetails.uuid);
refreshSingleTicket(ticketMessage.ticketDetails.uuid);
console.log('Processing ticket update:', ticketMessage.ticketDetails.ticketUUID);
await refreshSingleTicket(ticketMessage.ticketDetails.ticketUUID as string);
break;
}
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions src/store/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ export type TicketStatus =

export interface Ticket {
uuid: string;
ticketUUID?: string;
feature_uuid: string;
phase_uuid: string;
name: string;
Expand Down

0 comments on commit 621f92d

Please sign in to comment.