From e5250900cde96caf77156178b01c932b3216fd43 Mon Sep 17 00:00:00 2001 From: aryaantony92 Date: Fri, 6 Oct 2023 09:57:22 +0200 Subject: [PATCH] Fix issue with the merge button --- src/Resources/public/admin/js/cmf.js | 9 ++++++--- src/Resources/views/admin/duplicates/list.html.twig | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Resources/public/admin/js/cmf.js b/src/Resources/public/admin/js/cmf.js index fb564a8b..a7d58d85 100644 --- a/src/Resources/public/admin/js/cmf.js +++ b/src/Resources/public/admin/js/cmf.js @@ -854,9 +854,12 @@ app.SearchFilter.DateRangePicker = (function () { $(document).ready(function() { window.app.init($('body')); - $('#customerDuplicatesMerge').on('click', function () { - const duplicateIds = $('#customerDuplicatesMerge').data('duplicate-ids'); - new window.top.pimcore.plugin.objectmerger.panel(duplicateIds[0], duplicateIds[1]); + const duplicates = $('.customer-duplicates-merge'); + $.each(duplicates , function(index,duplicate) { + duplicate.addEventListener('click', (event) => { + const duplicateIds = JSON.parse(duplicate.dataset.duplicate_ids); + new window.top.pimcore.plugin.objectmerger.panel(duplicateIds[0], duplicateIds[1]); + }); }); }); })(jQuery); diff --git a/src/Resources/views/admin/duplicates/list.html.twig b/src/Resources/views/admin/duplicates/list.html.twig index 29ac65a9..df0bc4e4 100644 --- a/src/Resources/views/admin/duplicates/list.html.twig +++ b/src/Resources/views/admin/duplicates/list.html.twig @@ -36,7 +36,7 @@ - + {{ 'cmf_duplicates_merge' | trans({}, 'admin') }} {% if(not app.request.get('declined')) %}