"use strict";App.Pages.Customers=function(){function display(customer){$id.val(customer.id),$firstName.val(customer.first_name),$lastName.val(customer.last_name),$email.val(customer.email),$phoneNumber.val(customer.phone_number),$address.val(customer.address),$city.val(customer.city),$zipCode.val(customer.zip_code),$notes.val(customer.notes),$timezone.val(customer.timezone),$language.val(customer.language||"english"),$ldapDn.val(customer.ldap_dn),$customField1.val(customer.custom_field_1),$customField2.val(customer.custom_field_2),$customField3.val(customer.custom_field_3),$customField4.val(customer.custom_field_4),$customField5.val(customer.custom_field_5),$customerAppointments.empty(),customer.appointments.length||$("

",{text:lang("no_records_found")}).appendTo($customerAppointments),customer.appointments.forEach(function(appointment){if((vars("role_slug")!==App.Layouts.Backend.DB_SLUG_PROVIDER||parseInt(appointment.id_users_provider)===vars("user_id"))&&(vars("role_slug")!==App.Layouts.Backend.DB_SLUG_SECRETARY||-1!==vars("secretary_providers").indexOf(appointment.id_users_provider))){var start=App.Utils.Date.format(moment(appointment.start_datetime).toDate(),vars("date_format"),vars("time_format"),!0),end=App.Utils.Date.format(moment(appointment.end_datetime).toDate(),vars("date_format"),vars("time_format"),!0);$("

",{class:"appointment-row","data-id":appointment.id,html:[$("",{href:App.Utils.Url.siteUrl("calendar/reschedule/".concat(appointment.hash)),html:[$("",{class:"fas fa-edit me-1"}),$("",{text:appointment.service.name+" - "+appointment.provider.first_name+" "+appointment.provider.last_name}),$("
")]}),$("",{text:start}),$("
"),$("",{text:end}),$("
"),$("",{text:vars("timezones")[appointment.provider.timezone]})]}).appendTo("#customer-appointments")}})}function filter(keyword){var selectId=1"))}),response.length?response.length===filterLimit&&$("