fix the relations bug

master
Ondřej Hruška 4 years ago
parent 61d5791479
commit b24a8b2805
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 3
      yopa-web/resources/src/components/NewObjectForm.vue
  2. 4
      yopa-web/resources/src/components/NewRelationForm.vue
  3. 2
      yopa-web/resources/static/bundle.js
  4. 2
      yopa-web/resources/static/bundle.js.map

@ -36,6 +36,7 @@ export default {
model,
properties,
relations,
haveRelations: !isEmpty(relations),
model_names,
values,
name: '',
@ -132,7 +133,7 @@ export default {
<property v-for="(property, pi) in properties" :model="property" :values="values[property.id]" :key="pi"></property>
</table>
<div v-if="relations.length > 0">
<div v-if="haveRelations">
<h3>Relations</h3>
<new-relation

@ -118,7 +118,6 @@ export default {
</style>
<template>
<div>
<div class="new-relation" v-for="(instance, ri) in instances" :key="ri">
<b>{{ model.name }} -&gt; {{ related_model.name }}
<select v-model="instance.related">
@ -136,6 +135,5 @@ export default {
</div>
<a href="#" v-if="model.multiple || model.optional && instances.length==0"
@click="addInstance">Add {{ model.name }} -&gt; {{ related_model.name }}</a>
</div>
@click="addInstance">Add {{ model.name }} -&gt; {{ related_model.name }}</a><br>
</template>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save