|
|
@ -41,7 +41,7 @@ const { |
|
|
|
row, |
|
|
|
row, |
|
|
|
} = useLTARStoreOrThrow() |
|
|
|
} = useLTARStoreOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
const { addLTARRef, isNew } = useSmartsheetRowStoreOrThrow() |
|
|
|
const { addLTARRef, isNew, removeLTARRef } = useSmartsheetRowStoreOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
const isPublic = inject(IsPublicInj, ref(false)) |
|
|
|
const isPublic = inject(IsPublicInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
@ -56,12 +56,23 @@ const isFocused = ref(false) |
|
|
|
const linkRow = async (row: Record<string, any>, id: number) => { |
|
|
|
const linkRow = async (row: Record<string, any>, id: number) => { |
|
|
|
if (isNew.value) { |
|
|
|
if (isNew.value) { |
|
|
|
addLTARRef(row, injectedColumn?.value as ColumnType) |
|
|
|
addLTARRef(row, injectedColumn?.value as ColumnType) |
|
|
|
|
|
|
|
isChildrenExcludedListLinked.value[id] = true |
|
|
|
saveRow!() |
|
|
|
saveRow!() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
await link(row, {}, false, id) |
|
|
|
await link(row, {}, false, id) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const unlinkRow = async (row: Record<string, any>, id: number) => { |
|
|
|
|
|
|
|
if (isNew.value) { |
|
|
|
|
|
|
|
removeLTARRef(row, injectedColumn?.value as ColumnType) |
|
|
|
|
|
|
|
isChildrenExcludedListLinked.value[id] = false |
|
|
|
|
|
|
|
saveRow!() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
await unlink(row, {}, false, id) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** reload list on modal open */ |
|
|
|
/** reload list on modal open */ |
|
|
|
watch(vModel, (nextVal, prevVal) => { |
|
|
|
watch(vModel, (nextVal, prevVal) => { |
|
|
|
if (nextVal && !prevVal) { |
|
|
|
if (nextVal && !prevVal) { |
|
|
@ -212,7 +223,7 @@ watch(expandedFormDlg, () => { |
|
|
|
" |
|
|
|
" |
|
|
|
@click=" |
|
|
|
@click=" |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
if (isChildrenExcludedListLinked[Number.parseInt(id)]) unlink(refRow, {}, false, Number.parseInt(id)) |
|
|
|
if (isChildrenExcludedListLinked[Number.parseInt(id)]) unlinkRow(refRow, Number.parseInt(id)) |
|
|
|
else linkRow(refRow, Number.parseInt(id)) |
|
|
|
else linkRow(refRow, Number.parseInt(id)) |
|
|
|
} |
|
|
|
} |
|
|
|
" |
|
|
|
" |
|
|
@ -244,7 +255,7 @@ watch(expandedFormDlg, () => { |
|
|
|
show-less-items |
|
|
|
show-less-items |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<NcButton class="nc-close-btn" @click="vModel = false"> Close </NcButton> |
|
|
|
<NcButton class="nc-close-btn ml-auto" @click="vModel = false"> Close </NcButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Suspense> |
|
|
|
<Suspense> |
|
|
|
<LazySmartsheetExpandedForm |
|
|
|
<LazySmartsheetExpandedForm |
|
|
|