update according to api models
This commit is contained in:
@@ -56,8 +56,11 @@ export class UmbTemplateDetailServerDataSource
|
||||
* @return {*}
|
||||
* @memberof UmbTemplateDetailServerDataSource
|
||||
*/
|
||||
async createScaffold() {
|
||||
return await tryExecuteAndNotify(this.#host, TemplateResource.getTemplateScaffold());
|
||||
async createScaffold(masterTemplateId: string | null) {
|
||||
return await tryExecuteAndNotify(
|
||||
this.#host,
|
||||
TemplateResource.getTemplateScaffold({ masterTemplateId: masterTemplateId ?? undefined })
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -138,9 +138,9 @@ export class UmbTemplateRepository
|
||||
|
||||
//#region DETAILS:
|
||||
|
||||
async createScaffold() {
|
||||
async createScaffold(parentId: string | null) {
|
||||
await this.#init;
|
||||
return this.#detailDataSource.createScaffold();
|
||||
return this.#detailDataSource.createScaffold(parentId);
|
||||
}
|
||||
|
||||
async requestById(id: string) {
|
||||
|
||||
@@ -129,7 +129,7 @@ export class UmbTemplateWorkspaceContext extends UmbWorkspaceContext<UmbTemplate
|
||||
}
|
||||
|
||||
async create(parentId: string | null = null) {
|
||||
const { data } = await this.repository.createScaffold();
|
||||
const { data } = await this.repository.createScaffold(parentId);
|
||||
if (!data) return;
|
||||
this.setIsNew(true);
|
||||
this.#data.next({ ...data, id: '', name: '', alias: '', $type: 'TemplateResponseModel' });
|
||||
|
||||
Reference in New Issue
Block a user