@@ -759,7 +759,10 @@ viewKnowledgeModelEditor { appState, wrapMsg, eventMsg, model, editorBranch } km
759759 Input . reorderable
760760 { name = " chapters"
761761 , label = gettext " Chapters" appState. locale
762- , items = EditorBranch . filterDeleted editorBranch km. chapterUuids
762+ , items =
763+ km. chapterUuids
764+ |> EditorBranch . filterDeleted editorBranch
765+ |> EditorBranch . filterExistingChapters editorBranch
763766 , entityUuid = kmUuid
764767 , getReorderableState = flip Dict . get model. reorderableStates
765768 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -776,7 +779,10 @@ viewKnowledgeModelEditor { appState, wrapMsg, eventMsg, model, editorBranch } km
776779 Input . reorderable
777780 { name = " metrics"
778781 , label = gettext " Metrics" appState. locale
779- , items = EditorBranch . filterDeleted editorBranch km. metricUuids
782+ , items =
783+ km. metricUuids
784+ |> EditorBranch . filterDeleted editorBranch
785+ |> EditorBranch . filterExistingMetrics editorBranch
780786 , entityUuid = kmUuid
781787 , getReorderableState = flip Dict . get model. reorderableStates
782788 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -793,7 +799,10 @@ viewKnowledgeModelEditor { appState, wrapMsg, eventMsg, model, editorBranch } km
793799 Input . reorderable
794800 { name = " phases"
795801 , label = gettext " Phases" appState. locale
796- , items = EditorBranch . filterDeleted editorBranch km. phaseUuids
802+ , items =
803+ km. phaseUuids
804+ |> EditorBranch . filterDeleted editorBranch
805+ |> EditorBranch . filterExistingPhases editorBranch
797806 , entityUuid = kmUuid
798807 , getReorderableState = flip Dict . get model. reorderableStates
799808 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -810,7 +819,10 @@ viewKnowledgeModelEditor { appState, wrapMsg, eventMsg, model, editorBranch } km
810819 Input . reorderable
811820 { name = " tags"
812821 , label = gettext " Question Tags" appState. locale
813- , items = EditorBranch . filterDeleted editorBranch km. tagUuids
822+ , items =
823+ km. tagUuids
824+ |> EditorBranch . filterDeleted editorBranch
825+ |> EditorBranch . filterExistingTags editorBranch
814826 , entityUuid = kmUuid
815827 , getReorderableState = flip Dict . get model. reorderableStates
816828 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -827,7 +839,10 @@ viewKnowledgeModelEditor { appState, wrapMsg, eventMsg, model, editorBranch } km
827839 Input . reorderable
828840 { name = " integrations"
829841 , label = gettext " Integrations" appState. locale
830- , items = EditorBranch . filterDeleted editorBranch km. integrationUuids
842+ , items =
843+ km. integrationUuids
844+ |> EditorBranch . filterDeleted editorBranch
845+ |> EditorBranch . filterExistingIntegrations editorBranch
831846 , entityUuid = kmUuid
832847 , getReorderableState = flip Dict . get model. reorderableStates
833848 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -844,7 +859,10 @@ viewKnowledgeModelEditor { appState, wrapMsg, eventMsg, model, editorBranch } km
844859 Input . reorderable
845860 { name = " resourceCollections"
846861 , label = gettext " Resource Collections" appState. locale
847- , items = EditorBranch . filterDeleted editorBranch km. resourceCollectionUuids
862+ , items =
863+ km. resourceCollectionUuids
864+ |> EditorBranch . filterDeleted editorBranch
865+ |> EditorBranch . filterExistingResourceCollections editorBranch
848866 , entityUuid = kmUuid
849867 , getReorderableState = flip Dict . get model. reorderableStates
850868 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -933,7 +951,10 @@ viewChapterEditor { appState, wrapMsg, eventMsg, model, editorBranch } chapter =
933951 Input . reorderable
934952 { name = " questions"
935953 , label = gettext " Questions" appState. locale
936- , items = EditorBranch . filterDeleted editorBranch chapter. questionUuids
954+ , items =
955+ chapter. questionUuids
956+ |> EditorBranch . filterDeleted editorBranch
957+ |> EditorBranch . filterExistingQuestions editorBranch
937958 , entityUuid = chapter. uuid
938959 , getReorderableState = flip Dict . get model. reorderableStates
939960 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -1179,7 +1200,10 @@ viewQuestionEditor { appState, wrapMsg, eventMsg, model, editorBranch } question
11791200 Input . reorderable
11801201 { name = " references"
11811202 , label = gettext " References" appState. locale
1182- , items = EditorBranch . filterDeleted editorBranch <| Question . getReferenceUuids question
1203+ , items =
1204+ Question . getReferenceUuids question
1205+ |> EditorBranch . filterDeleted editorBranch
1206+ |> EditorBranch . filterExistingReferences editorBranch
11831207 , entityUuid = questionUuid
11841208 , getReorderableState = flip Dict . get model. reorderableStates
11851209 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -1196,7 +1220,10 @@ viewQuestionEditor { appState, wrapMsg, eventMsg, model, editorBranch } question
11961220 Input . reorderable
11971221 { name = " experts"
11981222 , label = gettext " Experts" appState. locale
1199- , items = EditorBranch . filterDeleted editorBranch <| Question . getExpertUuids question
1223+ , items =
1224+ Question . getExpertUuids question
1225+ |> EditorBranch . filterDeleted editorBranch
1226+ |> EditorBranch . filterExistingExperts editorBranch
12001227 , entityUuid = questionUuid
12011228 , getReorderableState = flip Dict . get model. reorderableStates
12021229 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -1234,7 +1261,10 @@ viewQuestionEditor { appState, wrapMsg, eventMsg, model, editorBranch } question
12341261 Input . reorderable
12351262 { name = " answers"
12361263 , label = gettext " Answers" appState. locale
1237- , items = EditorBranch . filterDeleted editorBranch <| Question . getAnswerUuids question
1264+ , items =
1265+ Question . getAnswerUuids question
1266+ |> EditorBranch . filterDeleted editorBranch
1267+ |> EditorBranch . filterExistingAnswers editorBranch
12381268 , entityUuid = questionUuid
12391269 , getReorderableState = flip Dict . get model. reorderableStates
12401270 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -1266,7 +1296,10 @@ viewQuestionEditor { appState, wrapMsg, eventMsg, model, editorBranch } question
12661296 Input . reorderable
12671297 { name = " questions"
12681298 , label = gettext " Questions" appState. locale
1269- , items = EditorBranch . filterDeleted editorBranch <| Question . getItemTemplateQuestionUuids question
1299+ , items =
1300+ Question . getItemTemplateQuestionUuids question
1301+ |> EditorBranch . filterDeleted editorBranch
1302+ |> EditorBranch . filterExistingQuestions editorBranch
12701303 , entityUuid = questionUuid
12711304 , getReorderableState = flip Dict . get model. reorderableStates
12721305 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -1421,7 +1454,10 @@ viewQuestionEditor { appState, wrapMsg, eventMsg, model, editorBranch } question
14211454 Input . reorderable
14221455 { name = " choices"
14231456 , label = gettext " Choices" appState. locale
1424- , items = EditorBranch . filterDeleted editorBranch <| Question . getChoiceUuids question
1457+ , items =
1458+ Question . getChoiceUuids question
1459+ |> EditorBranch . filterDeleted editorBranch
1460+ |> EditorBranch . filterExistingChoices editorBranch
14251461 , entityUuid = questionUuid
14261462 , getReorderableState = flip Dict . get model. reorderableStates
14271463 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -2706,7 +2742,10 @@ viewAnswerEditor { appState, wrapMsg, eventMsg, model, editorBranch } answer =
27062742 Input . reorderable
27072743 { name = " questions"
27082744 , label = gettext " Follow-Up Questions" appState. locale
2709- , items = EditorBranch . filterDeleted editorBranch answer. followUpUuids
2745+ , items =
2746+ answer. followUpUuids
2747+ |> EditorBranch . filterDeleted editorBranch
2748+ |> EditorBranch . filterExistingQuestions editorBranch
27102749 , entityUuid = answer. uuid
27112750 , getReorderableState = flip Dict . get model. reorderableStates
27122751 , toMsg = compose2 wrapMsg ReorderableMsg
@@ -3054,7 +3093,10 @@ viewResourceCollectionEditor { appState, wrapMsg, eventMsg, model, editorBranch
30543093 Input . reorderable
30553094 { name = " resourcePages"
30563095 , label = gettext " Resource Pages" appState. locale
3057- , items = EditorBranch . filterDeleted editorBranch resourceCollection. resourcePageUuids
3096+ , items =
3097+ resourceCollection. resourcePageUuids
3098+ |> EditorBranch . filterDeleted editorBranch
3099+ |> EditorBranch . filterExistingResourcePages editorBranch
30583100 , entityUuid = resourceCollection. uuid
30593101 , getReorderableState = flip Dict . get model. reorderableStates
30603102 , toMsg = compose2 wrapMsg ReorderableMsg
0 commit comments