Adjusted to show middle name in autocomplete suggestion. Optimized task images.

This commit is contained in:
Alexey Zinchenko 2019-05-10 16:26:24 +03:00
parent fe6e34f9de
commit a189c79edb
8 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,4 @@
# car-repair-site
Learning purposes
![Task](https://github.com/Prominence/car-repair-site/blob/master/java-task-1.1.jpg)
![Task](https://github.com/Prominence/car-repair-site/blob/master/java-task-1.2.jpg)
![Task](https://github.com/Prominence/car-repair-site/blob/master/src/main/resources/static/images/task.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

View File

@ -12,8 +12,7 @@
<h2>
<span><th:block th:text="#{home.requirements.label}"/>:</span>
</h2>
<img src="images/java-task-1.1.jpg" alt="Requirements"/>
<img src="images/java-task-1.2.jpg" alt="Requirements"/>
<img src="images/task.png" alt="Requirements"/>
</div>
</body>

View File

@ -95,7 +95,12 @@
transformResult: function(response) {
return {
suggestions: $.map($.parseJSON(response), function(item) {
return { value: item.firstName + ' ' + item.lastName, data: item.id};
var value = item.firstName;
if (item.middleName) {
value += (' ' + item.middleName);
}
value += (' ' + item.lastName)
return { value: value, data: item.id};
})
};
},