Optional options: { Optional maxOptional maxUpdate the current item and any parents to recalculate their ancestorIds, ancestorNamePath and depth Algorithm: If new parentId != null: -> Fetch parent items hierarchically until parentId = null is reached - Calculate ancestorIds - Calculate ancestorNamePath - Calculate depth -> Update organization's ancestorIds, ancestorNamePath, depth to match new structure -> Update childrenCount of new parent to + 1 If new parentId == null: -> Update ancestorIds, ancestorNamePath, depth to default If old parentId is not null: -> Update old parent's childrenCount to - 1
Optional previousParentId: null | stringUpdate children to recalculate their ancestorIds, ancestorNamePath and depth Algorithm:
Private dbPrivate hierarchyReadonly maxReadonly maxStatic Private Readonly COLLECTION_Generated using TypeDoc
Description
Service for creating and managing items that have a hierarchy