From 3ca5fa6de660df537d8973870864bb1303c08f6b Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 17 Jan 2022 21:31:53 +0100 Subject: [PATCH] Proper mark selected row when clicking on a result list item. --- assets/js/pages/customers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/pages/customers.js b/assets/js/pages/customers.js index 57e9ec5b..4428bddd 100644 --- a/assets/js/pages/customers.js +++ b/assets/js/pages/customers.js @@ -63,12 +63,12 @@ App.Pages.Customers = (function () { return; // Do nothing when user edits a customer record. } - const customerId = $(event.target).attr('data-id'); + const customerId = $(event.currentTarget).attr('data-id'); const customer = filterResults.find((filterResult) => Number(filterResult.id) === Number(customerId)); display(customer); $('#filter-customers .selected').removeClass('selected'); - $(event.target).addClass('selected'); + $(event.currentTarget).addClass('selected'); $('#edit-customer, #delete-customer').prop('disabled', false); }); @@ -308,7 +308,7 @@ App.Pages.Customers = (function () { // Service - Provider $('', { - 'href': App.Utils.Url.siteUrl(`backend/index/${appointment.hash}`), + 'href': App.Utils.Url.siteUrl(`calendar/reschedule/${appointment.hash}`), 'html': [ $('', { 'class': 'fas fa-edit me-1'