@@ -90,10 +90,15 @@ import { synchronizationStore, navigationStore, sourceStore, mappingStore } from
90
90
:loading =" sourcesLoading"
91
91
input-label =" Source ID" />
92
92
93
+ <NcSelect v-bind =" sourceTargetMappingOptions"
94
+ v-model =" sourceTargetMappingOptions.hashValue"
95
+ :loading =" sourceTargetMappingLoading"
96
+ input-label =" Source hash mapping" />
97
+
93
98
<NcSelect v-bind =" sourceTargetMappingOptions"
94
99
v-model =" sourceTargetMappingOptions.sourceValue"
95
100
:loading =" sourceTargetMappingLoading"
96
- input-label =" sourceTargetMapping " />
101
+ input-label =" Source target mapping " />
97
102
98
103
<NcTextField :value.sync =" synchronizationItem.sourceConfig.idPosition"
99
104
label =" (optional) Position of id in source object" />
@@ -135,7 +140,7 @@ import { synchronizationStore, navigationStore, sourceStore, mappingStore } from
135
140
<NcSelect v-bind =" sourceTargetMappingOptions"
136
141
v-model =" sourceTargetMappingOptions.targetValue"
137
142
:loading =" sourceTargetMappingLoading"
138
- input-label =" targetSourceMapping " />
143
+ input-label =" Target source mapping " />
139
144
</form >
140
145
141
146
<NcButton v-if =" !success"
@@ -208,6 +213,7 @@ export default {
208
213
headers: {},
209
214
query: {},
210
215
},
216
+ sourceHashMapping: ' ' ,
211
217
sourceTargetMapping: ' ' ,
212
218
targetId: ' ' ,
213
219
targetType: ' register/schema' ,
@@ -234,6 +240,7 @@ export default {
234
240
sourceTargetMappingLoading: false , // Indicates if the mappings are loading
235
241
sourceTargetMappingOptions: { // A list of mappings
236
242
options: [],
243
+ hashValue: null ,
237
244
sourceValue: null ,
238
245
targetValue: null ,
239
246
},
@@ -340,12 +347,19 @@ export default {
340
347
.then (({ entities }) => {
341
348
const activeSourceMapping = entities .find (mapping => mapping .id .toString () === this .synchronizationItem .sourceTargetMapping .toString ())
342
349
const activeTargetMapping = entities .find (mapping => mapping .id .toString () === this .synchronizationItem .targetSourceMapping .toString ())
350
+ const sourceHashMapping = entities .find (mapping => mapping .id .toString () === this .synchronizationItem .sourceHashMapping .toString ())
343
351
344
352
this .sourceTargetMappingOptions = {
345
353
options: entities .map (mapping => ({
346
354
label: mapping .name ,
347
355
id: mapping .id ,
348
356
})),
357
+ hashValue: sourceHashMapping
358
+ ? {
359
+ label: sourceHashMapping .name ,
360
+ id: sourceHashMapping .id ,
361
+ }
362
+ : null ,
349
363
sourceValue: activeSourceMapping
350
364
? {
351
365
label: activeSourceMapping .name ,
@@ -528,6 +542,7 @@ export default {
528
542
...this.synchronizationItem,
529
543
sourceId: this.sourceOptions.sourceValue?.id || null,
530
544
sourceType: this.typeOptions.value?.id || null,
545
+ sourceHashMapping: this.sourceTargetMappingOptions.hashValue?.id || null,
531
546
sourceTargetMapping: this.sourceTargetMappingOptions.sourceValue?.id || null,
532
547
targetType: this.targetTypeOptions.value?.id || null,
533
548
targetId: targetId || null,
0 commit comments