Skip to content

Commit 7a60ad8

Browse files
aryaantony92dvesh3
authored andcommitted
Fix issue with the merge of customer duplicates
1 parent d4d7340 commit 7a60ad8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Resources/public/admin/js/cmf.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,5 +853,10 @@ app.SearchFilter.DateRangePicker = (function () {
853853

854854
$(document).ready(function() {
855855
window.app.init($('body'));
856+
857+
$('#customerDuplicatesMerge').on('click', function () {
858+
const duplicateIds = $('#customerDuplicatesMerge').data('duplicate-ids');
859+
new window.top.pimcore.plugin.objectmerger.panel(duplicateIds[0], duplicateIds[1]);
860+
});
856861
});
857862
})(jQuery);

src/Resources/views/admin/duplicates/list.html.twig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<tbody id="customerduplicates_{{ duplicate.getDuplicateCustomers[0].getId() }}_{{ duplicate.getDuplicateCustomers[1].getId() }}" class="js-duplicates-item duplicates-item" >
3737
<tr>
3838
<td colspan="99">
39-
<a class="btn btn-primary btn-xs pull-right" onClick="new window.top.pimcore.plugin.objectmerger.panel({{ duplicate.getDuplicateCustomers[0].getId() }}, {{ duplicate.getDuplicateCustomers[1].getId() }}); ">
39+
<a class="btn btn-primary btn-xs pull-right" id="customerDuplicatesMerge" data-duplicate-ids='[{{ duplicate.getDuplicateCustomers[0].getId() }},{{ duplicate.getDuplicateCustomers[1].getId() }}]'>
4040
{{ 'cmf_duplicates_merge' | trans({}, 'admin') }}
4141
</a>
4242
{% if(not app.request.get('declined')) %}
@@ -65,6 +65,7 @@
6565
{% endfor %}
6666
</tr>
6767
{% endfor %}
68+
6869
</tbody>
6970
{% endfor %}
7071

@@ -74,6 +75,4 @@
7475
{{ include('@PimcoreCustomerManagementFramework/admin/partial/pagination/default.html.twig') }}
7576
</div>
7677
</div>
77-
78-
7978
{% endblock %}

0 commit comments

Comments
 (0)