|
|
@ -461,16 +461,18 @@ export default { |
|
|
|
// eslint-disable-next-line no-cond-assign |
|
|
|
// eslint-disable-next-line no-cond-assign |
|
|
|
while (child = this.localState.pop()) { |
|
|
|
while (child = this.localState.pop()) { |
|
|
|
if (row) { |
|
|
|
if (row) { |
|
|
|
// todo: use common method |
|
|
|
|
|
|
|
const cid = this.childMeta.columns.filter(c => c.pk).map(c => child[c.title]).join('___') |
|
|
|
const cid = this.childMeta.columns.filter(c => c.pk).map(c => child[c.title]).join('___') |
|
|
|
const pid = this.meta.columns.filter(c => c.pk).map(c => row[c.title]).join('___') |
|
|
|
const pid = this.meta.columns.filter(c => c.pk).map(c => row[c.title]).join('___') |
|
|
|
|
|
|
|
|
|
|
|
const vcidCol = this.assocMeta.columns.find(c => c.id === this.column.colOptions.fk_mm_parent_column_id).title |
|
|
|
await this.$api.dbTableRow.nestedAdd( |
|
|
|
const vpidCol = this.assocMeta.columns.find(c => c.id === this.column.colOptions.fk_mm_child_column_id).title |
|
|
|
'noco', |
|
|
|
await this.assocApi.insert({ |
|
|
|
this.projectName, |
|
|
|
[vcidCol]: parseIfInteger(cid), |
|
|
|
this.meta.title, |
|
|
|
[vpidCol]: parseIfInteger(pid) |
|
|
|
pid, |
|
|
|
}) |
|
|
|
'mm', |
|
|
|
|
|
|
|
this.column.title, |
|
|
|
|
|
|
|
cid |
|
|
|
|
|
|
|
) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
await this.addChildToParent(child) |
|
|
|
await this.addChildToParent(child) |
|
|
|
} |
|
|
|
} |
|
|
|