forked from Ruderverein-Donau-Linz/rowt
		
	[TASK] select boat on click
This commit is contained in:
		@@ -42,6 +42,10 @@ function initBoatActions() {
 | 
			
		||||
          const rowers = Number(select.dataset.seats) - 1;
 | 
			
		||||
          choiceObjects['newrower'].config.maxItemCount = rowers;
 | 
			
		||||
          choiceObjects['newrower'].removeActiveItems(rowers);
 | 
			
		||||
          let boatSelect = <HTMLSelectElement>document.querySelector('#boat_id');
 | 
			
		||||
          if(boatSelect && select.dataset.id) {
 | 
			
		||||
            boatSelect.value = select.dataset.id;
 | 
			
		||||
          }
 | 
			
		||||
          (rowers === 0 ? choiceObjects['newrower'].disable() : choiceObjects['newrower'].enable());
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
				<strong>{{ amount_seats }}x</strong>
 | 
			
		||||
			</div>
 | 
			
		||||
			{% for boat in grouped_boats %}
 | 
			
		||||
				<div id="boat-{{ boat.id }}" class="px-3 boats-js" {% if boat.damage != 'locked' %} data-seats="{{boat.amount_seats}}" data-onclick="true" {% endif %}>
 | 
			
		||||
				<div id="boat-{{ boat.id }}" class="px-3 boats-js" {% if boat.damage != 'locked' %} data-seats="{{boat.amount_seats}}" data-onclick="true" {% endif %} data-id="{{ boat.id }}">
 | 
			
		||||
					<span class="status-damage status-damage-{{ boat.damage }}"></span>
 | 
			
		||||
					<span {% if boat.damage == 'locked' or boat.on_water %} class="opacity-50" {% endif %}>{{ boat.name }}
 | 
			
		||||
						{% if boat.owner %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user