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