<h1>SHOWIN DA USER</h1>

<% if session_user? %>
	<p>Hello <%= @user.first_name %>!</p>
<% end %>

<p>Preferred Music Styles: <%=@user.genres %></p>
<p>Average Rating: <%=@user.average_rating  %> </p>

<% if @user.has_studios %>
	<% @user.studios.each do |studio| %>
		<%= render partial: "studios/studio", locals: {studio: studio } %>
	<% end %>
<% end %>

<h3><%=@user.username %>'s reviews of Other Users: </h3>

<% @user.written_reviews.each do |review| %>
	<%= render partial: "reviews/review", locals: {review: review } %>
<% end %>

<h3>Reviews of <%= @user.username %> </h3>

<% @user.reviews.each do |review| %>
	<%= render partial: "reviews/review", locals: {review: review } %>
<% end %>







<h1>SHOWIN DA USER</h1>


<h3>add helper method here</h3>
	<p>Hello <%= @user.first_name %>!</p>
	<p>Here are your upcoming studio bookings:</p>
	<ul>
		<% @user.future_bookings.each do |booking| %>
			<li>Studio: <%=booking.availability.studio %> </li>
			<li>Start Time: <%=booking.start_time%> </li>
			<li>End Time: <%=booking.end_time%> </li>
		<% end %>
	</ul>

	<p>Here are your past studio bookings:</p>
	<ul>
		<% @user.past_bookings.each do |booking| %>
			<li>Studio: <%=booking.availability.studio.name %> </li>
			<li>Start Time: <%=booking.start_time%> </li>
			<li>End Time: <%=booking.end_time%> </li>
		<% end %>
	</ul>	
<p>Preferred Music Styles: <%=@user.genres %></p>
<p>Average Rating: <%=@user.average_rating  %> </p>

<% if @user.has_studios %>
	<% @user.studios.each do |studio| %>
		<%= render partial: "studios/studio", locals: {studio: studio } %>
	<% end %>
<% end %>

<h3><%=@user.username %>'s reviews of Other Users: </h3>

<% @user.written_reviews.each do |review| %>
	<%= render partial: "reviews/review", locals: {review: review } %>
<% end %>

<h3>Reviews of <%= @user.username %> </h3>

<% @user.reviews.each do |review| %>
	<%= render partial: "reviews/review", locals: {review: review } %>
<% end %>







Add list for upcoming bookings and past bookings to user page
Add list for upcoming bookings and past bookings to user page
