bug fixes
This commit is contained in:
parent
66e67ffa44
commit
db9c5db6e3
|
@ -82,18 +82,18 @@
|
|||
if (editableColumn.type === LINK_TYPE && editableColumn.tableId) {
|
||||
// Determine the relationship type based on the selected values of both parts
|
||||
if (
|
||||
relationshipPart1 === PrettyRelationshipDefinitions.Many &&
|
||||
relationshipPart2 === PrettyRelationshipDefinitions.One
|
||||
relationshipPart1 === PrettyRelationshipDefinitions.MANY &&
|
||||
relationshipPart2 === PrettyRelationshipDefinitions.ONE
|
||||
) {
|
||||
editableColumn.relationshipType = RelationshipType.MANY_TO_ONE
|
||||
} else if (
|
||||
relationshipPart1 === PrettyRelationshipDefinitions.Many &&
|
||||
relationshipPart1 === PrettyRelationshipDefinitions.MANY &&
|
||||
relationshipPart2 === PrettyRelationshipDefinitions.MANY
|
||||
) {
|
||||
editableColumn.relationshipType = RelationshipType.MANY_TO_MANY
|
||||
} else if (
|
||||
relationshipPart1 === PrettyRelationshipDefinitions.One &&
|
||||
relationshipPart2 === PrettyRelationshipDefinitions.Many
|
||||
relationshipPart1 === PrettyRelationshipDefinitions.ONE &&
|
||||
relationshipPart2 === PrettyRelationshipDefinitions.MANY
|
||||
) {
|
||||
editableColumn.relationshipType = RelationshipType.ONE_TO_MANY
|
||||
}
|
||||
|
@ -133,18 +133,18 @@
|
|||
if (editableColumn.type === LINK_TYPE && editableColumn.tableId) {
|
||||
relationshipTableIdSecondary = editableColumn.tableId
|
||||
if (editableColumn.relationshipType === RelationshipType.MANY_TO_ONE) {
|
||||
relationshipPart1 = PrettyRelationshipDefinitions.Many
|
||||
relationshipPart2 = PrettyRelationshipDefinitions.One
|
||||
relationshipPart1 = PrettyRelationshipDefinitions.MANY
|
||||
relationshipPart2 = PrettyRelationshipDefinitions.ONE
|
||||
} else if (
|
||||
editableColumn.relationshipType === RelationshipType.MANY_TO_MANY
|
||||
) {
|
||||
relationshipPart1 = PrettyRelationshipDefinitions.Many
|
||||
relationshipPart2 = PrettyRelationshipDefinitions.Many
|
||||
relationshipPart1 = PrettyRelationshipDefinitions.MANY
|
||||
relationshipPart2 = PrettyRelationshipDefinitions.MANY
|
||||
} else if (
|
||||
editableColumn.relationshipType === RelationshipType.ONE_TO_MANY
|
||||
) {
|
||||
relationshipPart1 = PrettyRelationshipDefinitions.One
|
||||
relationshipPart2 = PrettyRelationshipDefinitions.Many
|
||||
relationshipPart1 = PrettyRelationshipDefinitions.ONE
|
||||
relationshipPart2 = PrettyRelationshipDefinitions.MANY
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
export let linkEditDisabled
|
||||
export let tableOptions
|
||||
export let errors
|
||||
$: console.log(relationshipPart1)
|
||||
</script>
|
||||
|
||||
<div class="relationship-container">
|
||||
|
@ -64,6 +65,6 @@
|
|||
}
|
||||
|
||||
.relationship-part {
|
||||
flex-basis: 45%;
|
||||
flex-basis: 60%;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue