Skip to content

Commit 041fecd

Browse files
committed
fixed csv import feature
1 parent e418e70 commit 041fecd

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

meta_configurator/src/components/toolbar/dialogs/csvimport/ImportCsvDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ defineExpose({show: openDialog, close: hideDialog});
389389
>{{ foreignKey.value }}/</span
390390
>
391391
<InputText
392-
v-model="column.pathAfterRowIndex.value"
392+
v-model="column.pathAfterRowIndex"
393393
:data-testid="'csv-column-path-' + column.name"
394394
class="fixed-width" />
395395
</td>

meta_configurator/src/components/toolbar/dialogs/csvimport/csvImportTypes.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import {ref, type Ref, unref} from 'vue';
1+
import {type Ref, unref} from 'vue';
22
import {jsonPointerToPathTyped} from '@/utility/pathUtils';
33
import type {Path} from '@/utility/path';
44
import {stringToIdentifier} from '@/utility/stringToIdentifier';
55

66
export class CsvImportColumnMappingData {
77
constructor(public index: number, public name: string, pathBeforeRowIndex: Ref<string>) {
88
this.pathBeforeRowIndex = pathBeforeRowIndex;
9-
this.pathAfterRowIndex = ref(stringToIdentifier(this.name, false));
10-
this.titleInSchema = ref(this.name);
9+
this.pathAfterRowIndex = stringToIdentifier(this.name, false);
10+
this.titleInSchema = this.name;
1111
}
1212

1313
public pathBeforeRowIndex: Ref<string>;
14-
public pathAfterRowIndex: Ref<string>;
15-
public titleInSchema: Ref<string>;
14+
public pathAfterRowIndex: string;
15+
public titleInSchema: string;
1616

1717
public getPathForJsonDocument(rowIndex: number): Path {
1818
return jsonPointerToPathTyped(
19-
'/' + unref(this.pathBeforeRowIndex) + '/' + rowIndex + '/' + unref(this.pathAfterRowIndex)
19+
'/' + unref(this.pathBeforeRowIndex) + '/' + rowIndex + '/' + this.pathAfterRowIndex
2020
);
2121
}
2222

0 commit comments

Comments
 (0)