chore: handle moving & removing tags with subtags into/out of vaults (#2528)
This commit is contained in:
@@ -702,6 +702,18 @@ export class ItemManager extends Services.AbstractService implements Services.It
|
||||
return tags.filter((tag) => tag.parentId === itemToLookupUuidFor.uuid)
|
||||
}
|
||||
|
||||
public getDeepTagChildren(itemToLookupUuidFor: Models.SNTag): Models.SNTag[] {
|
||||
const allChildren: Models.SNTag[] = []
|
||||
|
||||
const children = this.getTagChildren(itemToLookupUuidFor)
|
||||
for (const child of children) {
|
||||
allChildren.push(child)
|
||||
allChildren.push(...this.getDeepTagChildren(child))
|
||||
}
|
||||
|
||||
return allChildren
|
||||
}
|
||||
|
||||
public isTagAncestor(tagToLookUpUuidFor: Models.SNTag, childToLookUpUuidFor: Models.SNTag): boolean {
|
||||
const tag = this.findItem<Models.SNTag>(childToLookUpUuidFor.uuid)
|
||||
if (!tag) {
|
||||
|
||||
Reference in New Issue
Block a user