forked from Ruderverein-Donau-Linz/rowt
		
	Merge branch 'staging' of gitlab.com:PhilippHofer/rot into staging
This commit is contained in:
		@@ -129,6 +129,26 @@ function setMaxAmountRowers(name: string, rowers: number) {
 | 
			
		||||
    //    only_steering.parentElement?.parentElement?.parentElement?.classList.add('opacity-50');     
 | 
			
		||||
    //  }
 | 
			
		||||
    //}
 | 
			
		||||
    let shipmaster = <HTMLElement>document.querySelector('#shipmaster-newrowerjs');
 | 
			
		||||
    let steering_person = <HTMLElement>document.querySelector('#steering_person-newrowerjs');
 | 
			
		||||
    if (rowers == 1){
 | 
			
		||||
	if (shipmaster.parentNode) {
 | 
			
		||||
		(<HTMLElement>shipmaster.parentNode).classList.add('hidden');
 | 
			
		||||
	}
 | 
			
		||||
	if (steering_person.parentNode){
 | 
			
		||||
		(<HTMLElement>steering_person.parentNode).classList.add('hidden');
 | 
			
		||||
	}
 | 
			
		||||
    }else{
 | 
			
		||||
	if (shipmaster.parentNode){
 | 
			
		||||
		(<HTMLElement>shipmaster.parentNode).classList.remove('hidden');
 | 
			
		||||
	}
 | 
			
		||||
	shipmaster.setAttribute('required', 'required');
 | 
			
		||||
 | 
			
		||||
	if (steering_person.parentNode){
 | 
			
		||||
		(<HTMLElement>steering_person.parentNode).classList.remove('hidden');
 | 
			
		||||
	}
 | 
			
		||||
	steering_person.setAttribute('required', 'required');
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -244,7 +244,7 @@ ORDER BY departure DESC
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        if let Ok(log_to_finalize) = TryInto::<LogToFinalize>::try_into(log.clone()) {
 | 
			
		||||
            //TODO: fix clone()
 | 
			
		||||
            //TODO: fix clone() above
 | 
			
		||||
 | 
			
		||||
            if !boat.shipmaster_allowed(created_by_user).await {
 | 
			
		||||
                return Err(LogbookCreateError::UserNotAllowedToUseBoat);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user