This commit is contained in:
Mads Rasmussen
2023-09-13 15:44:56 +02:00
parent f40eec7fc8
commit 461cc4b2e3
2 changed files with 6 additions and 5 deletions

View File

@@ -21,11 +21,14 @@ export class UmbCreateDocumentModalElement extends UmbModalBaseElement<
async firstUpdated() {
const documentId = this.data?.id || null;
this.#retrieveAllowedChildrenOf(documentId);
this.#retrieveHeadline(documentId);
this.#retrieveAllowedDocumentTypesOf(documentId);
if (documentId) {
this.#retrieveHeadline(documentId);
}
}
async #retrieveAllowedChildrenOf(id: string | null) {
async #retrieveAllowedDocumentTypesOf(id: string | null) {
const { data } = await this.#documentRepository.requestAllowedDocumentTypesOf(id);
if (data) {

View File

@@ -172,7 +172,6 @@ export class UmbDocumentServerDataSource
/**
* Get the allowed document types for root
* @param {string} id
* @return {*}
* @memberof UmbDocumentTypeServerDataSource
*/
async getAllowedDocumentTypesAtRoot() {
@@ -183,7 +182,6 @@ export class UmbDocumentServerDataSource
/**
* Get the allowed document types for a given parent id
* @param {string} id
* @return {*}
* @memberof UmbDocumentTypeServerDataSource
*/
async getAllowedDocumentTypesOf(id: string) {