From fd92b4c5b3cbdc5b8e3996706b0c293673bf3c4c Mon Sep 17 00:00:00 2001 From: casperiv <53900565+casperiv0@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:00:47 +0100 Subject: [PATCH] feat(admin-ui): Channel aware picker --- .../src/common/utilities/bulk-action-utils.ts | 14 +++---- .../assign-to-channel-dialog.component.html | 8 ++-- .../assign-to-channel-dialog.component.ts | 15 +++---- .../channel-assignment-control.component.html | 2 +- .../promotion-list-bulk-actions.ts | 39 ++++++------------- .../role-detail/role-detail.component.html | 1 + 6 files changed, 32 insertions(+), 47 deletions(-) diff --git a/packages/admin-ui/src/lib/core/src/common/utilities/bulk-action-utils.ts b/packages/admin-ui/src/lib/core/src/common/utilities/bulk-action-utils.ts index 113eeea614..5777d3424a 100644 --- a/packages/admin-ui/src/lib/core/src/common/utilities/bulk-action-utils.ts +++ b/packages/admin-ui/src/lib/core/src/common/utilities/bulk-action-utils.ts @@ -179,8 +179,8 @@ export type CreateBulkAssignToChannelActionConfig = Pick< bulkAssignToChannel: ( dataService: DataService, ids: string[], - channelId: string, - ) => Observable>>; + channelIds: string[], + ) => Array>>>; }; export function createBulkAssignToChannelAction( @@ -215,7 +215,7 @@ export function createBulkAssignToChannelAction( .bulkAssignToChannel( dataService, selection.map(c => c.id), - result.id, + result.map(c => c.id), ) .pipe(mapTo(result)); } else { @@ -224,10 +224,10 @@ export function createBulkAssignToChannelAction( }), ) .subscribe(result => { - notificationService.success(_('common.notify-assign-to-channel-success-with-count'), { - count: selection.length, - channelCode: result.code, - }); + // notificationService.success(_('common.notify-assign-to-channel-success-with-count'), { + // count: selection.length, + // channelCode: result.code, + // }); clearSelection(); }); }, diff --git a/packages/admin-ui/src/lib/core/src/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.html b/packages/admin-ui/src/lib/core/src/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.html index e2ae6604e5..8db87c6cd1 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.html +++ b/packages/admin-ui/src/lib/core/src/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.html @@ -20,7 +20,7 @@ @@ -29,9 +29,9 @@ -