Improve graph/map UX and move contact editing to dedicated pages.

Add viewport controls, collapsible panels with persisted state, filters modal, and refined context menus; preserve map layout on navigation and let contacts be edited with relations on /contacts/:id instead of list modals.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
gitrusprus
2026-07-06 15:15:45 +03:00
co-authored by Cursor
parent 10e7d65a00
commit 986d36ff51
22 changed files with 1638 additions and 623 deletions
+17 -1
View File
@@ -45,6 +45,13 @@
<label>Заметки</label>
<textarea v-model="form.notes" class="form-control" placeholder="Дополнительная информация..." rows="3"></textarea>
</div>
<RelationLinkFields
v-if="showRelationLink"
ref="relationLinkRef"
:options="linkToOptions"
:initial-target-id="initialLinkToId"
:conflict-mode="conflictMode"
/>
<component
:is="Ext"
v-for="(Ext, index) in contactFormExtensions"
@@ -74,17 +81,23 @@ import { reactive, ref, watch, computed, onMounted } from 'vue'
import { useNetworkMapsStore } from '../stores/networkMaps'
import { listMembershipsByContact } from '../application/usecases/networkMaps'
import { getContactFormExtensions } from '../core/pluginRegistry'
import RelationLinkFields from './RelationLinkFields.vue'
const props = defineProps({
initial: { type: Object, default: () => ({}) },
initialMapIds: { type: Array, default: null },
deletable: { type: Boolean, default: false },
showRelationLink: { type: Boolean, default: false },
linkToOptions: { type: Array, default: () => [] },
initialLinkToId: { type: [String, Number], default: '' },
conflictMode: { type: Boolean, default: false },
})
const emit = defineEmits(['submit', 'cancel', 'delete'])
const mapsStore = useNetworkMapsStore()
const contactFormExtensions = getContactFormExtensions()
const pluginTags = ref([])
const relationLinkRef = ref(null)
const showDelete = computed(() => {
if (props.deletable) return true
@@ -150,7 +163,10 @@ onMounted(async () => {
function onSubmit() {
const { mapIds, ...contactData } = form
emit('submit', contactData, mapIds, { tags: [...pluginTags.value] })
const relationLink = props.showRelationLink
? relationLinkRef.value?.getRelationLink?.() ?? null
: null
emit('submit', contactData, mapIds, { tags: [...pluginTags.value] }, relationLink)
}
</script>