diff --git a/lib/spazio_solazzo_web/live/landing/meeting_live.html.heex b/lib/spazio_solazzo_web/live/landing/meeting_live.html.heex index ea5035c..a85b200 100644 --- a/lib/spazio_solazzo_web/live/landing/meeting_live.html.heex +++ b/lib/spazio_solazzo_web/live/landing/meeting_live.html.heex @@ -4,7 +4,7 @@ booking_label="Booking request" price="€35" price_unit="hour" - capacity={@space.capacity} + capacity="8" images={[ ~p"/images/meeting_room/01.jpg", ~p"/images/meeting_room/02.jpg", diff --git a/lib/spazio_solazzo_web/live/landing/music_live.html.heex b/lib/spazio_solazzo_web/live/landing/music_live.html.heex index bc18e4b..4529909 100644 --- a/lib/spazio_solazzo_web/live/landing/music_live.html.heex +++ b/lib/spazio_solazzo_web/live/landing/music_live.html.heex @@ -4,7 +4,7 @@ booking_label="Booking request" price="€50" price_unit="hour" - capacity={@space.capacity} + capacity="8" images={[ ~p"/images/music_room/01.jpg", ~p"/images/music_room/02.jpg", diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index bce956a..ac91733 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -23,7 +23,7 @@ coworking = "Arcipelago", "arcipelago", "Flexible desk spaces for remote work", - 10 + 6 ) IO.puts("✓ Created Coworking space") @@ -52,54 +52,44 @@ IO.puts("✓ Created Music Studio space") # Create Coworking Time Slot Templates for each weekday coworking_slots = [ - %{start_time: ~T[09:00:00], end_time: ~T[13:00:00]}, + %{start_time: ~T[10:00:00], end_time: ~T[14:00:00]}, %{start_time: ~T[14:00:00], end_time: ~T[18:00:00]} ] -weekdays = [:monday, :tuesday, :wednesday, :thursday, :friday] - -for day <- weekdays, slot <- coworking_slots do +for day <- [:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday], + slot <- coworking_slots do BookingSystem.create_time_slot_template!(slot.start_time, slot.end_time, day, coworking.id) end -IO.puts( - "✓ Created #{length(weekdays) * length(coworking_slots)} coworking time slots across weekdays" -) +IO.puts("✓ Created coworking time slots across weekdays") -# Create Meeting Room Hourly Slots (9am-6pm) for weekdays -meeting_slots = - for hour <- 9..17 do - start_time = Time.new!(hour, 0, 0) - end_time = Time.new!(hour + 1, 0, 0) +for day <- [:monday, :tuesday, :thursday, :friday, :saturday], hour <- 10..17 do + start_time = Time.new!(hour, 0, 0) + end_time = Time.new!(hour + 1, 0, 0) - %{ - start_time: start_time, - end_time: end_time - } - end - -for day <- weekdays, slot <- meeting_slots do - BookingSystem.create_time_slot_template!(slot.start_time, slot.end_time, day, meeting.id) + BookingSystem.create_time_slot_template!(start_time, end_time, day, meeting.id) end IO.puts( - "✓ Created #{length(weekdays) * length(meeting_slots)} meeting room hourly slots across weekdays" + "✓ Created meeting room hourly slots across for monday, tuesday, thursday, friday and saturday" ) -# Create Music Studio Evening Slots for all days of the week -music_slots = [ - %{start_time: ~T[18:00:00], end_time: ~T[20:00:00]}, - %{start_time: ~T[20:00:00], end_time: ~T[22:00:00]} -] - -all_days = [:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday] - -for day <- all_days, slot <- music_slots do - BookingSystem.create_time_slot_template!(slot.start_time, slot.end_time, day, music.id) +for day <- [:wednesday, :sunday], hour <- 14..17 do + start_time = Time.new!(hour, 0, 0) + end_time = Time.new!(hour + 1, 0, 0) + BookingSystem.create_time_slot_template!(start_time, end_time, day, meeting.id) end -IO.puts( - "✓ Created #{length(all_days) * length(music_slots)} music studio evening slots across all days" -) +IO.puts("✓ Created meeting room hourly slots across for wednesday and sunday") + +for day <- [:monday, :wednesday, :thursday, :friday, :saturday, :sunday] do + BookingSystem.create_time_slot_template!(~T[18:00:00], ~T[21:00:00], day, music.id) +end + +for day <- [:wednesday, :sunday] do + BookingSystem.create_time_slot_template!(~T[11:00:00], ~T[14:00:00], day, music.id) +end + +IO.puts("✓ Created music studio evening slots across the week") IO.puts("\n🎉 Seeding complete!")