Update document-blueprint-options-create-modal.element.ts
This commit is contained in:
@@ -20,14 +20,14 @@ export class UmbDocumentBlueprintOptionsCreateModalElement extends UmbModalBaseE
|
||||
|
||||
#createFolderAction?: UmbCreateFolderEntityAction;
|
||||
|
||||
#itemRepository = new UmbDocumentBlueprintFolderRepository(this);
|
||||
#folderRepository = new UmbDocumentBlueprintFolderRepository(this);
|
||||
|
||||
override async connectedCallback(): Promise<void> {
|
||||
super.connectedCallback();
|
||||
if (!this.data?.parent) throw new Error('A parent is required to create a folder');
|
||||
|
||||
if (this.data.parent.unique) {
|
||||
const { data: parent } = await this.#itemRepository.request(this.data.parent.unique.toString());
|
||||
const { data: parent } = await this.#folderRepository.requestByUnique(this.data.parent.unique.toString());
|
||||
this._parentName = parent?.name ?? this.localize.term('general_unknown');
|
||||
} else {
|
||||
this._parentName = this.localize.term('treeHeaders_contentBlueprints');
|
||||
|
||||
Reference in New Issue
Block a user