Compare commits

...

3 Commits

Author SHA1 Message Date
268c2018ae Merge pull request 'allow to search by nickname' (#347) from staging into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 11m23s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 4m59s
Reviewed-on: #347
2024-04-07 15:31:07 +02:00
b7e8e1fa37 keep defaults
All checks were successful
CI/CD Pipeline / test (push) Successful in 11m40s
CI/CD Pipeline / deploy-staging (push) Successful in 5m3s
CI/CD Pipeline / deploy-main (push) Has been skipped
2024-04-07 15:30:52 +02:00
fe6af27813 allow to search by nickname
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled
2024-04-07 15:26:37 +02:00
2 changed files with 2 additions and 1 deletions

View File

@ -364,6 +364,7 @@ function initNewChoice(select: HTMLInputElement) {
steering_person.setAttribute("required", "required"); steering_person.setAttribute("required", "required");
} }
const choice = new Choices(select, { const choice = new Choices(select, {
searchFields: ['label', 'value', 'customProperties.searchableText'],
removeItemButton: true, removeItemButton: true,
loadingText: "Wird geladen...", loadingText: "Wird geladen...",
noResultsText: "Keine Ergebnisse gefunden", noResultsText: "Keine Ergebnisse gefunden",

View File

@ -86,7 +86,7 @@
<option value="{{ user.id }}" <option value="{{ user.id }}"
{% if sel %}selected{% endif %} {% if sel %}selected{% endif %}
{% if user.on_water %}disabled="disabled"{% endif %} {% if user.on_water %}disabled="disabled"{% endif %}
data-custom-properties='{"is_cox": {{ "cox" in user.roles }}, "is_racing": {{ "Rennrudern" in user.roles }}, "steers": {{ user.id == steering_person_id }}, "cox_on_boat": {{ user.id == cox_on_boat }}}'> data-custom-properties='{"is_cox": {{ "cox" in user.roles }}, "is_racing": {{ "Rennrudern" in user.roles }}, "steers": {{ user.id == steering_person_id }}, "cox_on_boat": {{ user.id == cox_on_boat }}, "searchableText": "{{ user.nickname }}"}'>
{{ user.name }} {{ user.name }}
{% if user.on_water %}(am Wasser){% endif %} {% if user.on_water %}(am Wasser){% endif %}
</option> </option>