Skip to content

Commit

Permalink
Merge pull request #272 from Digital-Engineering/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
DnOberon authored and GitHub Enterprise committed Mar 9, 2023
2 parents 23a8646 + 4b44bff commit a20b489
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 204 deletions.
16 changes: 6 additions & 10 deletions AdminWebApp/src/components/etl/transformationDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -690,14 +690,14 @@
<h4 class="text-h4">
{{ $t('dataMapping.metatypePropertyMapping') }}
<small class="mx-2">
<span v-if="!rootArray">{{ graphProperties.length }} / {{ payloadKeys.length }} properties selected</span>
<span v-if="rootArray">{{ graphProperties.length }} / {{ payloadKeys.length }} properties selected ({{ payloadSelectedArrayKeys.length }} array properties available)</span>
<span v-if="!rootArray">{{ propertyMapping.filter(k => (k.metatype_key_id || k.metatype_relationship_key_id)).length }} / {{ payloadKeys.length }} properties selected</span>
<span v-if="rootArray">{{ propertyMapping.filter(k => (k.metatype_key_id || k.metatype_relationship_key_id)).length }} / {{ payloadKeys.length }} properties selected ({{ payloadSelectedArrayKeys.length }} array properties available)</span>
</small>
<info-tooltip :message="$t('dataMapping.PropertyMappingHelp')"></info-tooltip>
</h4>
<v-spacer></v-spacer>
<v-btn
@click="autoPopulateMetatypeKeys()"
@click.native.stop="autoPopulateMetatypeKeys()"
class="ml-auto mr-4"
style="flex: 0 1 auto;"
>
Expand All @@ -712,7 +712,7 @@
<info-tooltip :message="$t('dataMapping.PropertyMappingHelp')"></info-tooltip>
</h4>
<v-btn
@click="autoPopulateRelationshipKeys()"
@click.native.stop="autoPopulateRelationshipKeys()"
class="mr-4"
style="flex: 0 1 auto;"
>
Expand Down Expand Up @@ -1286,7 +1286,6 @@ export default class TransformationDialog extends Vue {
payloadArrayKeys: any = []
rootArray: any = null
metadataKeys: string[] = []
graphProperties: { [key: string]: any }[] = []
operators = [
{text: "==", value: "==", requiresValue: true},
Expand Down Expand Up @@ -1463,7 +1462,6 @@ export default class TransformationDialog extends Vue {
this.selectedMetatypeKeys = []
this.propertyMapping = []
this.metadataKeys = []
this.graphProperties = []
}
editReset() {
Expand All @@ -1479,7 +1477,6 @@ export default class TransformationDialog extends Vue {
if (Array.isArray(this.transformation?.keys)) this.propertyMapping = this.transformation?.keys as Array<{ [key: string]: any }>
if(this.propertyMapping) {
this.metadataKeys = this.propertyMapping.filter(k => k.is_metadata_key === true).map(k => k.key) as Array<string>
this.graphProperties = this.propertyMapping.filter(k => (k.metatype_key_id || k.metatype_relationship_key_id)) as Array<{[key: string]: any}>
}
})
.catch(e => this.errorMessage = e)
Expand All @@ -1504,7 +1501,6 @@ export default class TransformationDialog extends Vue {
if (Array.isArray(this.transformation?.keys)) this.propertyMapping = this.transformation?.keys as Array<{ [key: string]: any }>
if(this.propertyMapping) {
this.metadataKeys = this.propertyMapping.filter(k => k.is_metadata_key === true).map(k => k.key) as Array<string>
this.graphProperties = this.propertyMapping.filter(k => (k.metatype_key_id || k.metatype_relationship_key_id)) as Array<{[key: string]: any}>
}
})
.catch(e => this.errorMessage = e)
Expand Down Expand Up @@ -1813,7 +1809,7 @@ export default class TransformationDialog extends Vue {
const metatypeKey = this.selectedMetatypeKeys.find(metatypeKey => metatypeKey.property_name === rootKey)
if (metatypeKey) {
if (metatypeKey && !this.propertyMapping.some(m => (m.key === payloadKey && m.metatype_key_id === metatypeKey.id))) {
this.propertyMapping.push({
id: uuidv4(),
key: payloadKey,
Expand All @@ -1833,7 +1829,7 @@ export default class TransformationDialog extends Vue {
const relationship = this.selectedMetatypeRelationshipPairKeys.find(relationshipKey => relationshipKey.property_name === rootKey)
if (relationship) {
if (relationship && !this.propertyMapping.some(m => (m.key === payloadKey && m.metatype_relationship_key_id === relationship.id))) {
this.propertyMapping.push({
id: uuidv4(),
key: payloadKey,
Expand Down
202 changes: 8 additions & 194 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a20b489

Please sign in to comment.