Skip to content

Commit

Permalink
Merge pull request stakwork#721 from MahtabBukhari/TicketUUID-is-unde…
Browse files Browse the repository at this point in the history
…fined-in-call-for-update

[BUG] - TicketUUID is undefined in call for update
  • Loading branch information
humansinstitute authored Dec 6, 2024
2 parents 286ff1b + 621f92d commit 11a3f27
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 11a3f27

Please sign in to comment.