fix create empty
This commit is contained in:
@@ -7,6 +7,6 @@ export class UmbCreateEmptyPartialViewAction<T extends { copy(): Promise<void> }
|
||||
}
|
||||
|
||||
async execute() {
|
||||
history.pushState(null, '', `section/settings/workspace/partial-view/create/${this.unique ?? 'null'}/`);
|
||||
history.pushState(null, '', `section/settings/workspace/partial-view/create/${this.unique ?? 'null'}/Empty`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,14 +202,20 @@ export class UmbPartialViewsRepository
|
||||
createScaffold(parentId: string | null, preset: string): Promise<DataSourceResponse<TextFileResponseModelBaseModel>> {
|
||||
return this.#detailDataSource.createScaffold(parentId, preset);
|
||||
}
|
||||
create(data: CreatePartialViewRequestModel): Promise<DataSourceResponse<any>> {
|
||||
return this.#detailDataSource.insert(data);
|
||||
async create(data: CreatePartialViewRequestModel): Promise<DataSourceResponse<any>> {
|
||||
const promise = this.#detailDataSource.insert(data);
|
||||
await promise;
|
||||
this.requestTreeItemsOf(data.parentPath ? data.parentPath : null);
|
||||
return promise;
|
||||
}
|
||||
save(id: string, requestBody: UpdatePartialViewRequestModel): Promise<UmbDataSourceErrorResponse> {
|
||||
return this.#detailDataSource.update(id, requestBody);
|
||||
}
|
||||
delete(id: string): Promise<UmbDataSourceErrorResponse> {
|
||||
return this.#detailDataSource.delete(id);
|
||||
async delete(id: string): Promise<UmbDataSourceErrorResponse> {
|
||||
const promise = this.#detailDataSource.delete(id);
|
||||
const parentPath = id.substring(0, id.lastIndexOf('/'));
|
||||
this.requestTreeItemsOf(parentPath ? parentPath : null);
|
||||
return promise;
|
||||
}
|
||||
|
||||
getSnippets({ skip = 0, take = 100 }): Promise<DataSourceResponse<PagedSnippetItemResponseModel>> {
|
||||
|
||||
@@ -24,7 +24,6 @@ export class UmbPartialViewsWorkspaceElement extends UmbLitElement {
|
||||
const parentKey = info.match.params.parentKey;
|
||||
const decodePath = decodeURIComponent(parentKey);
|
||||
const snippetName = info.match.params.snippetName;
|
||||
|
||||
this.#partialViewsWorkspaceContext.create(decodePath === 'null' ? null : parentKey, snippetName);
|
||||
|
||||
new UmbWorkspaceIsNewRedirectController(
|
||||
|
||||
Reference in New Issue
Block a user