<commit_before>=render :partial => "shared/navbar", :user => @user
			
%div#wrapper
	%div#sidebar-wrapper
		%ul.sidebar-nav
			%li
				%a= link_to 'Home', home_path
			-if @user.usertype != 'Administrative Assistant'
				%li
					%a= link_to 'Set Availability', availabilities_path
			- if @user.usertype == 'Administrator' || @user.usertype == 'Administrative Assistant'
				%li 
					%a= link_to 'Shift Scheduler', shifts_path
				%li
					%a= link_to 'Set FTE Multiplier', multiply_path

	=render :partial => "shared/sidebar-showhide"

	%div#page-content-wrapper
		%div.container-fluid 
			%h2 Set Your Preference
			:plain
				Pay Period
			= (@date_start.strftime("%U")).to_i/2
			%br
			= link_to '<<', availabilities_path(:newstart => @date_start - 14.to_f)
			= "#{@date_start.strftime("%B")} #{@date_start.day} to #{(@date_start + 13.to_f).strftime("%B")} #{(@date_start + 13.to_f).day}"
			= link_to '>>', availabilities_path(:newstart => @date_start + 14.to_f)

			= form_tag 'update_availabilities', :method => :get do
				%table.table
					%thead
						- @next_seven.each do |day|
							%th= "#{day.to_time.strftime("%A")} #{day.month}/#{day.day}"
					%tbody
						%tr
							- @next_seven.each do |day|
								%td
									%table
										- @shifts.each do |shift|
											- if shift.shiftstart.to_s[5..6] == day.to_s[5..6] && shift.shiftstart.to_s[8..9] == day.to_s[8..9]
												%tr.shift
													- if shift.shiftend.to_s[8..9].to_s == day.to_s[8..9]
														%td= "#{shift.shiftstart.to_s[11..15]} to #{shift.shiftend.to_s[11..15]}"
													- else
														%td= "#{shift.shiftstart.to_s[11..15]} to #{shift.shiftend.to_s[11..15]}+"
													- availability = Availability.where(user_id: session[:user_id], shift_id: shift.id).first
													- if availability.nil? || availability.availability == 0
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', false
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', false
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', true
														%td.details= link_to 'details', shift
													- elsif availability.availability == 2
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', true
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', false
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', false
														%td.details= link_to 'details', shift
													- elsif availability.availability == 1
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', false
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', true
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', false
														%td.details= link_to 'details', shift

				%table.table
					%thead
						- @second_seven.each do |day|
							%th= "#{day.to_time.strftime("%A")} #{day.month}/#{day.day}"
					%tbody
						%tr
							- @second_seven.each do |day|
								%td
									%table
										- @shifts.each do |shift|
											- if shift.shiftstart.to_s[5..6] == day.to_s[5..6] && shift.shiftstart.to_s[8..9] == day.to_s[8..9]
												%tr.shift
													- if shift.shiftend.to_s[8..9].to_s == day.to_s[8..9]
														%td= "#{shift.shiftstart.to_s[11..15]} to #{shift.shiftend.to_s[11..15]}"
													- else
														%td= "#{shift.shiftstart.to_s[11..15]} to #{shift.shiftend.to_s[11..15]}+"
													- availability = Availability.where(user_id: session[:user_id], shift_id: shift.id).first
													- if availability.nil? || availability.availability == 0
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', false
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', false
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', true
														%td.details= link_to 'details', shift
													- elsif availability.availability == 2
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', true
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', false
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', false
														%td.details= link_to 'details', shift
													- elsif availability.availability == 1
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', false
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', true
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', false
														%td.details= link_to 'details', shift

				= submit_tag 'Update'

			%div.content-separator
			%h2 Your Availabilities
<commit_msg>made view for requirement when setting availabilities<commit_after>=render :partial => "shared/navbar", :user => @user
			
%div#wrapper
	%div#sidebar-wrapper
		%ul.sidebar-nav
			%li
				%a= link_to 'Home', home_path
			-if @user.usertype != 'Administrative Assistant'
				%li
					%a= link_to 'Set Availability', availabilities_path
			- if @user.usertype == 'Administrator' || @user.usertype == 'Administrative Assistant'
				%li 
					%a= link_to 'Shift Scheduler', shifts_path
				%li
					%a= link_to 'Set FTE Multiplier', multiply_path

	=render :partial => "shared/sidebar-showhide"

	%div#page-content-wrapper
		%div.container-fluid 
			%h2 Set Your Preference
			:plain
				Pay Period
			= (@date_start.strftime("%U")).to_i/2
			%br
			= link_to '<<', availabilities_path(:newstart => @date_start - 14.to_f)
			= "#{@date_start.strftime("%B")} #{@date_start.day} to #{(@date_start + 13.to_f).strftime("%B")} #{(@date_start + 13.to_f).day}"
			= link_to '>>', availabilities_path(:newstart => @date_start + 14.to_f)

			= form_tag 'update_availabilities', :method => :get do
				%table.table
					%thead
						- @next_seven.each do |day|
							%th= "#{day.to_time.strftime("%A")} #{day.month}/#{day.day}"
					%tbody
						%tr
							- @next_seven.each do |day|
								%td
									%table
										- @shifts.each do |shift|
											- if shift.shiftstart.to_s[5..6] == day.to_s[5..6] && shift.shiftstart.to_s[8..9] == day.to_s[8..9]
												%tr.shift
													- if shift.shiftend.to_s[8..9].to_s == day.to_s[8..9]
														%td= "#{shift.shiftstart.to_s[11..15]} to #{shift.shiftend.to_s[11..15]}"
													- else
														%td= "#{shift.shiftstart.to_s[11..15]} to #{shift.shiftend.to_s[11..15]}+"
													- availability = Availability.where(user_id: session[:user_id], shift_id: shift.id).first
													- if availability.nil? || availability.availability == 0
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', false
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', false
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', true
														%td.details= link_to 'details', shift
													- elsif availability.availability == 2
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', true
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', false
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', false
														%td.details= link_to 'details', shift
													- elsif availability.availability == 1
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', false
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', true
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', false
														%td.details= link_to 'details', shift

				%table.table
					%thead
						- @second_seven.each do |day|
							%th= "#{day.to_time.strftime("%A")} #{day.month}/#{day.day}"
					%tbody
						%tr
							- @second_seven.each do |day|
								%td
									%table
										- @shifts.each do |shift|
											- if shift.shiftstart.to_s[5..6] == day.to_s[5..6] && shift.shiftstart.to_s[8..9] == day.to_s[8..9]
												%tr.shift
													- if shift.shiftend.to_s[8..9].to_s == day.to_s[8..9]
														%td= "#{shift.shiftstart.to_s[11..15]} to #{shift.shiftend.to_s[11..15]}"
													- else
														%td= "#{shift.shiftstart.to_s[11..15]} to #{shift.shiftend.to_s[11..15]}+"
													- availability = Availability.where(user_id: session[:user_id], shift_id: shift.id).first
													- if availability.nil? || availability.availability == 0
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', false
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', false
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', true
														%td.details= link_to 'details', shift
													- elsif availability.availability == 2
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', true
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', false
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', false
														%td.details= link_to 'details', shift
													- elsif availability.availability == 1
														%td
															%div#green= radio_button_tag "#{shift.id}", 'yes', false
														%td
															%div#yellow= radio_button_tag "#{shift.id}", 'maybe', true
														%td
															%div#red= radio_button_tag "#{shift.id}", 'no', false
														%td.details= link_to 'details', shift

				= submit_tag 'Update'

			%div.content-separator
			%h2 Your Availabilities

			- curr_amt = 0
			- Availability.all.each do |availability|
				- if User.find(availability.user_id) == @user and availability.availability != 0
					- shift = Shift.find(availability.shift_id)
					- printf "_______________________________________#{shift.shiftstart}"
					- if shift.shiftstart >= @date_start and shift.shiftstart <= (@date_start + 13.to_f)
						- curr_amt += (shift.shiftend - shift.shiftstart)/1.hours
			%p= "You are currently signed up for #{curr_amt.to_i} hours of the required #{(@user.fte*@user.fte_multiplier*80).to_i} hours you need to make yourself available."
			%p= "However, you have to work #{(@user.fte*80).to_i} hours per pay period."
{'fraction_non_alphanumeric': 0.16110952788068775, 'fraction_numerical': 0.01472404293720908, 'mean_word_length': 2.0454150997975122, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1069844', 'n_tokens_mistral': 5534, 'n_tokens_neox': 3552, 'n_words': 694}