From 89b4a49eb189b902b9db503c70ef5e047b33d398 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 4 Mar 2024 00:07:11 +0100 Subject: [PATCH] update --- .../partial-view-create-options-modal.element.ts | 2 +- .../script-create-options-modal.element.ts | 2 +- .../stylesheet-create-options-modal.element.ts | 2 +- .../entity-bulk-actions/delete/delete.action.ts | 11 ++++++++--- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/options-modal/partial-view-create-options-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/options-modal/partial-view-create-options-modal.element.ts index 0bd871bbb7..1899781d2c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/options-modal/partial-view-create-options-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/options-modal/partial-view-create-options-modal.element.ts @@ -10,7 +10,7 @@ export class UmbPartialViewCreateOptionsModalElement extends UmbModalBaseElement UmbPartialViewCreateOptionsModalData, string > { - #createFolderAction?: UmbCreateFolderEntityAction; + #createFolderAction?: UmbCreateFolderEntityAction; connectedCallback(): void { super.connectedCallback(); diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/create/options-modal/script-create-options-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/create/options-modal/script-create-options-modal.element.ts index 86294646bf..1fd849f6cd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/create/options-modal/script-create-options-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/create/options-modal/script-create-options-modal.element.ts @@ -8,7 +8,7 @@ import { UmbCreateFolderEntityAction } from '@umbraco-cms/backoffice/tree'; @customElement('umb-script-create-options-modal') export class UmbScriptCreateOptionsModalElement extends UmbModalBaseElement { #modalManager?: UmbModalManagerContext; - #createFolderAction?: UmbCreateFolderEntityAction; + #createFolderAction?: UmbCreateFolderEntityAction; constructor() { super(); diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/options-modal/stylesheet-create-options-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/options-modal/stylesheet-create-options-modal.element.ts index 8c3fb77cef..0e1cfd7d9c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/options-modal/stylesheet-create-options-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/entity-actions/create/options-modal/stylesheet-create-options-modal.element.ts @@ -9,7 +9,7 @@ export class UmbStylesheetCreateOptionsModalElement extends UmbModalBaseElement< UmbStylesheetCreateOptionsModalData, string > { - #createFolderAction?: UmbCreateFolderEntityAction; + #createFolderAction?: UmbCreateFolderEntityAction; connectedCallback(): void { super.connectedCallback(); diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/entity-bulk-actions/delete/delete.action.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/entity-bulk-actions/delete/delete.action.ts index 8d26668d56..70aab4c9ac 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user-group/entity-bulk-actions/delete/delete.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user-group/entity-bulk-actions/delete/delete.action.ts @@ -1,9 +1,9 @@ -import type { UmbUserGroupDetailRepository } from '../../repository/index.js'; +import { UmbUserGroupDetailRepository } from '../../repository/index.js'; import { html } from '@umbraco-cms/backoffice/external/lit'; import { UmbEntityBulkActionBase } from '@umbraco-cms/backoffice/entity-bulk-action'; import { umbConfirmModal } from '@umbraco-cms/backoffice/modal'; -export class UmbDeleteUserGroupEntityBulkAction extends UmbEntityBulkActionBase { +export class UmbDeleteUserGroupEntityBulkAction extends UmbEntityBulkActionBase { async execute() { if (this.selection.length === 0) return; @@ -16,9 +16,14 @@ export class UmbDeleteUserGroupEntityBulkAction extends UmbEntityBulkActionBase< //TODO: How should we handle bulk actions? right now we send a request per item we want to change. //TODO: For now we have to reload the page to see the update + + const repository = new UmbUserGroupDetailRepository(this._host); + for (let index = 0; index < this.selection.length; index++) { const element = this.selection[index]; - await this.repository?.delete(element); + await repository?.delete(element); } } + + destroy(): void {} }