Move the default option to the beginning of the category dropdown

This commit is contained in:
Alex Tselegidis 2024-07-07 12:31:35 +02:00
parent fec1b1be3e
commit 8c8aaaa5e7

View file

@ -407,11 +407,11 @@ App.Pages.Services = (function () {
App.Http.ServiceCategories.search('', 999).then((response) => {
$serviceCategoryId.empty();
$serviceCategoryId.append(new Option('', '')).val('');
response.forEach((serviceCategory) => {
$serviceCategoryId.append(new Option(serviceCategory.name, serviceCategory.id));
});
$serviceCategoryId.append(new Option('', '')).val('');
});
}