@@ -475,7 +475,6 @@ const noteStore = useNoteStore()
475475
476476const allExpanded = ref (false )
477477const config = contextStore .config
478- const creatingNoteEvent = ref (undefined )
479478const currentUser = contextStore .currentUser
480479const defaultShowPerTab = ref (5 )
481480const editModeNoteId = ref (undefined )
@@ -536,11 +535,12 @@ onMounted(() => {
536535 ' comment-added' : onCommentAdded,
537536 ' comment-deleted' : onCommentDeleted,
538537 ' comment-updated' : onCommentUpdated,
539- ' note-creation-is-starting' : onNoteCreateStartEvent,
540538 ' note-created' : afterNoteCreated,
541539 ' note-updated ' : note => {
542- editModeNoteId .value = null
543- props .onNoteUpdated (note).then (refreshSearchIndex)
540+ if (note .sid === props .student .sid ) {
541+ editModeNoteId .value = null
542+ props .onNoteUpdated (note).then (refreshSearchIndex)
543+ }
544544 },
545545 ' notes-created ' : noteIdsBySid => {
546546 const noteId = noteIdsBySid[props .student .sid ]
@@ -583,8 +583,9 @@ const afterEditAdvisingNote = (updatedNote, putFocusId) => {
583583}
584584
585585const afterNoteCreated = note => {
586- creatingNoteEvent .value = null
587- props .onNoteUpdated (note).then (refreshSearchIndex)
586+ if (note .sid === props .student .sid ) {
587+ props .onNoteUpdated (note).then (refreshSearchIndex)
588+ }
588589}
589590
590591const afterNoteEditCancel = () => {
@@ -774,12 +775,6 @@ const onCommentUpdated = comment => {
774775 }
775776}
776777
777- const onNoteCreateStartEvent = event => {
778- if (includes (event .completeSidSet , props .student .sid )) {
779- creatingNoteEvent .value = event
780- }
781- }
782-
783778const open = message => {
784779 if (([' eForm' , ' note' ].includes (message .type ) && message .id === editModeNoteId .value )) {
785780 return false
0 commit comments