Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/create/create.action.ts
Mads Rasmussen a7874d7c22 update url
2024-03-01 16:18:34 +01:00

18 lines
693 B
TypeScript

import type { UmbDictionaryDetailRepository } from '../../repository/index.js';
import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action';
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
export default class UmbCreateDictionaryEntityAction extends UmbEntityActionBase<UmbDictionaryDetailRepository> {
constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string, entityType: string) {
super(host, repositoryAlias, unique, entityType);
}
async execute() {
history.pushState(
{},
'',
`/section/dictionary/workspace/dictionary/create/parent/${this.entityType}/${this.unique ?? 'null'}`,
);
}
}