Flip junction and m2m in modal detail

This commit is contained in:
rijkvanzanten
2020-09-10 15:52:59 -04:00
parent 974c6288fd
commit 141b80d21e

View File

@@ -1,15 +1,6 @@
<template>
<v-modal v-model="_active" :title="title" persistent form-width>
<v-form
:loading="loading"
:initial-values="item"
:collection="collection"
:primary-key="primaryKey"
v-model="_edits"
/>
<template v-if="junctionField">
<v-divider large>{{ junctionFieldInfo.name }}</v-divider>
<v-form
:loading="loading"
:initial-values="item && item[junctionField]"
@@ -18,8 +9,18 @@
:edits="_edits[junctionField]"
@input="setJunctionEdits"
/>
<v-divider />
</template>
<v-form
:loading="loading"
:initial-values="item"
:collection="collection"
:primary-key="primaryKey"
v-model="_edits"
/>
<template #footer>
<v-button @click="cancel" secondary>{{ $t('cancel') }}</v-button>
<v-button @click="save">{{ $t('save') }}</v-button>