action close commerce et listing

This commit is contained in:
Tykayn 2025-05-28 17:27:48 +02:00 committed by tykayn
parent 14f28ef405
commit 268ac799e4
6 changed files with 97 additions and 2 deletions

View file

@ -49,6 +49,16 @@ document.addEventListener('DOMContentLoaded', () => {
}
});
}
const btnClosedCommerce = document.querySelector('#closedCommerce');
if (btnClosedCommerce) {
btnClosedCommerce.addEventListener('click', () => {
if (!confirm('Êtes-vous sûr de vouloir signaler ce commerce comme fermé ?')) {
return;
}
window.location.href = '/closed_commerce/' + document.getElementById('app_public_closed_commerce').value;
});
}
});