@@ -91,7 +91,7 @@ async function setupUISegmentPartNotesPublicationObservers(
9191 triggerUpdate ( { invalidateSegmentIds : [ doc . segmentId , oldDoc . segmentId ] } ) ,
9292 removed : ( doc ) => triggerUpdate ( { invalidateSegmentIds : [ doc . segmentId ] } ) ,
9393 } ) ,
94- cache . DeletedPartInstances . find ( { } ) . observe ( {
94+ cache . PartInstances . find ( { } ) . observe ( {
9595 added : ( doc ) => triggerUpdate ( { invalidateSegmentIds : [ doc . segmentId ] } ) ,
9696 changed : ( doc , oldDoc ) =>
9797 triggerUpdate ( { invalidateSegmentIds : [ doc . segmentId , oldDoc . segmentId ] } ) ,
@@ -184,13 +184,13 @@ export async function manipulateUISegmentPartNotesPublicationData(
184184interface UpdateNotesData {
185185 rundownsCache : Map < RundownId , Pick < Rundown , RundownFields > >
186186 parts : Map < SegmentId , Pick < DBPart , PartFields > [ ] >
187- deletedPartInstances : Map < SegmentId , Pick < DBPartInstance , PartInstanceFields > [ ] >
187+ partInstances : Map < SegmentId , Pick < DBPartInstance , PartInstanceFields > [ ] >
188188}
189189function compileUpdateNotesData ( cache : ReadonlyDeep < ContentCache > ) : UpdateNotesData {
190190 return {
191191 rundownsCache : normalizeArrayToMap ( cache . Rundowns . find ( { } ) . fetch ( ) , '_id' ) ,
192192 parts : groupByToMap ( cache . Parts . find ( { } ) . fetch ( ) , 'segmentId' ) ,
193- deletedPartInstances : groupByToMap ( cache . DeletedPartInstances . find ( { } ) . fetch ( ) , 'segmentId' ) ,
193+ partInstances : groupByToMap ( cache . PartInstances . find ( { } ) . fetch ( ) , 'segmentId' ) ,
194194 }
195195}
196196
@@ -205,7 +205,7 @@ function updateNotesForSegment(
205205 segment ,
206206 getRundownNrcsName ( state . rundownsCache . get ( segment . rundownId ) ) ,
207207 state . parts . get ( segment . _id ) ?? [ ] ,
208- state . deletedPartInstances . get ( segment . _id ) ?? [ ]
208+ state . partInstances . get ( segment . _id ) ?? [ ]
209209 )
210210
211211 // Insert generated notes
0 commit comments