Interface one to many (#533)

* Extract edit modal to standalone component

* Fix creating new item from m2o edit modal

* Rename item-modal to modal-detail

* Extract selection modal in standalone component

* Add required primary-key prop to v-form

* Add inline prop to table

* Fetch items in o2m

* Accept numbers for primary key in v-form

* Use correct collection in render template in m2o

* Render modal detail

* Fix edit existing

* Add add-new

* Do things

* Finish o2m
This commit is contained in:
Rijk van Zanten
2020-05-07 10:53:51 -04:00
committed by GitHub
parent b4fdf96900
commit 0c17735e0e
25 changed files with 1003 additions and 212 deletions

View File

@@ -14,7 +14,12 @@
<activity-navigation />
</template>
<v-form collection="directus_activity" :loading="loading" :initial-values="item" />
<v-form
collection="directus_activity"
:loading="loading"
:initial-values="item"
:primary-key="primaryKey"
/>
</private-view>
</template>

View File

@@ -138,6 +138,7 @@
:initial-values="item"
:collection="collection"
:batch-mode="isBatch"
:primary-key="primaryKey"
v-model="edits"
/>

View File

@@ -97,6 +97,7 @@
:initial-values="item"
collection="directus_files"
:batch-mode="isBatch"
:primary-key="primaryKey"
v-model="edits"
/>
</div>

View File

@@ -2,7 +2,7 @@
<v-tab-item value="advanced">
<h2 class="title" v-if="isNew">{{ $t('advanced_options_title') }}</h2>
<v-form :initial-values="existingField" v-model="_edits" :fields="fields" />
<v-form :initial-values="existingField" v-model="_edits" :fields="fields" primary-key="+" />
</v-tab-item>
</template>

View File

@@ -10,6 +10,7 @@
Array.isArray(selectedDisplay.options)
"
:fields="selectedDisplay.options"
primary-key="+"
v-model="_options"
/>
</transition-expand>

View File

@@ -10,6 +10,7 @@
Array.isArray(selectedInterface.options)
"
:fields="selectedInterface.options"
primary-key="+"
v-model="_options"
/>
</transition-expand>

View File

@@ -67,6 +67,7 @@
:loading="loading"
:initial-values="item"
:batch-mode="isBatch"
:primary-key="collection"
v-model="edits"
/>
</div>

View File

@@ -17,7 +17,12 @@
</template>
<div class="settings">
<v-form :initial-values="initialValues" v-model="edits" :fields="fields" />
<v-form
:initial-values="initialValues"
v-model="edits"
:fields="fields"
:primary-key="1"
/>
</div>
</private-view>
</template>

View File

@@ -54,6 +54,7 @@
:fields="fields"
:loading="loading"
:initial-values="initialValues"
:primary-key="id"
v-model="edits"
/>

View File

@@ -67,6 +67,7 @@
:initial-values="item"
collection="directus_webhooks"
:batch-mode="isBatch"
:primary-key="primaryKey"
v-model="edits"
/>

View File

@@ -67,6 +67,7 @@
:initial-values="item"
collection="directus_users"
:batch-mode="isBatch"
:primary-key="primaryKey"
v-model="edits"
/>