update name to unique instead of id

This commit is contained in:
Mads Rasmussen
2023-11-22 21:49:05 +01:00
parent d99b01d24e
commit 22b651bdb9

View File

@@ -15,11 +15,11 @@ export class UmbDataTypeWorkspaceElement extends UmbLitElement {
private _routes: UmbRoute[] = [
{
path: 'create/:parentId',
path: 'create/:parentUnique',
component: () => this.#element,
setup: (_component, info) => {
const parentId = info.match.params.parentId === 'null' ? null : info.match.params.parentId;
this.#workspaceContext.create(parentId);
const parentUnique = info.match.params.parentUnique === 'null' ? null : info.match.params.parentUnique;
this.#workspaceContext.create(parentUnique);
new UmbWorkspaceIsNewRedirectController(
this,
@@ -29,11 +29,11 @@ export class UmbDataTypeWorkspaceElement extends UmbLitElement {
},
},
{
path: 'edit/:id',
path: 'edit/:unique',
component: () => this.#element,
setup: (_component, info) => {
const id = info.match.params.id;
this.#workspaceContext.load(id);
const unique = info.match.params.unique;
this.#workspaceContext.load(unique);
},
},
];