Skip to content

Commit

Permalink
Merge pull request #4704 from 3drepo/ISSUE_4699
Browse files Browse the repository at this point in the history
ISSUE #4699 - Frontend doesn't read ifc/revit ids in groups
  • Loading branch information
carmenfan authored Jan 22, 2024
2 parents ea3bc42 + 2a7a897 commit 3e0ccff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions frontend/src/v5/services/realtime/ticket.events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { getMeshIDsByQuery } from '@/v4/services/api';
import { meshObjectsToV5GroupNode } from '@/v5/helpers/viewpoint.helpers';
import { subscribeToRoomEvent } from './realtime.service';
import { TicketsActionsDispatchers } from '../actionsDispatchers';
import { fetchTicketGroup } from '../api/tickets';

// Container ticket
export const enableRealtimeContainerUpdateTicket = (teamspace: string, project: string, containerId: string) => (
Expand Down Expand Up @@ -52,6 +53,10 @@ export const enableRealtimeContainerUpdateTicketGroup = (teamspace: string, proj
const { data } = await getMeshIDsByQuery(teamspace, containerId, group.rules, revision);
// eslint-disable-next-line no-param-reassign
group.objects = meshObjectsToV5GroupNode(data);
// eslint-disable-next-line no-underscore-dangle
} else if (group.objects.some((o) => !o._ids)) {
const { objects } = await fetchTicketGroup(teamspace, project, containerId, group.ticket, group._id, false);
group.objects = objects;
}
TicketsActionsDispatchers.updateTicketGroupSuccess(group);
},
Expand Down Expand Up @@ -87,6 +92,10 @@ export const enableRealtimeFederationUpdateTicketGroup = (teamspace: string, pro
const { data } = await getMeshIDsByQuery(teamspace, federationId, group.rules, revision);
// eslint-disable-next-line no-param-reassign
group.objects = meshObjectsToV5GroupNode(data);
// eslint-disable-next-line no-underscore-dangle
} else if (group.objects.some((o) => !o._ids)) {
const { objects } = await fetchTicketGroup(teamspace, project, federationId, group.ticket, group._id, true);
group.objects = objects;
}
TicketsActionsDispatchers.updateTicketGroupSuccess(group);
},
Expand Down
1 change: 1 addition & 0 deletions frontend/src/v5/store/tickets/tickets.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export interface IGroupRule {
export type Group = {
_id?: string,
name: string,
ticket?: string,
description?: string,
objects?: { container: string, _ids: string[] }[],
rules?: IGroupRule[],
Expand Down

0 comments on commit 3e0ccff

Please sign in to comment.