diff --git a/lib/spazio_solazzo/booking_system/booking.ex b/lib/spazio_solazzo/booking_system/booking.ex index 80e61fc..fca5919 100644 --- a/lib/spazio_solazzo/booking_system/booking.ex +++ b/lib/spazio_solazzo/booking_system/booking.ex @@ -212,6 +212,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking do customer_phone: booking.customer_phone, customer_comment: booking.customer_comment, space_name: booking.space.name, + space_slug: booking.space.slug, start_datetime: booking.start_datetime, end_datetime: booking.end_datetime } @@ -283,6 +284,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking do customer_email: booking.customer_email, customer_phone: booking.customer_phone, space_name: booking.space.name, + space_slug: booking.space.slug, start_datetime: booking.start_datetime, end_datetime: booking.end_datetime, action: "accepted" @@ -314,6 +316,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking do customer_email: booking.customer_email, customer_phone: booking.customer_phone, space_name: booking.space.name, + space_slug: booking.space.slug, start_datetime: booking.start_datetime, end_datetime: booking.end_datetime, action: "rejected", diff --git a/lib/spazio_solazzo/booking_system/booking/admin_action_email_worker.ex b/lib/spazio_solazzo/booking_system/booking/admin_action_email_worker.ex index b62844c..28d3bd8 100644 --- a/lib/spazio_solazzo/booking_system/booking/admin_action_email_worker.ex +++ b/lib/spazio_solazzo/booking_system/booking/admin_action_email_worker.ex @@ -16,6 +16,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.AdminActionEmailWorker do "customer_email" => customer_email, "customer_phone" => customer_phone, "space_name" => space_name, + "space_slug" => space_slug, "start_datetime" => start_datetime_str, "end_datetime" => end_datetime_str, "action" => "accepted" @@ -30,6 +31,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.AdminActionEmailWorker do customer_email: customer_email, customer_phone: customer_phone, space_name: space_name, + space_slug: space_slug, start_datetime: start_datetime, end_datetime: end_datetime, date: CalendarExt.format_datetime_date_only(start_datetime), diff --git a/lib/spazio_solazzo/booking_system/booking/email.ex b/lib/spazio_solazzo/booking_system/booking/email.ex index d442eec..195e050 100644 --- a/lib/spazio_solazzo/booking_system/booking/email.ex +++ b/lib/spazio_solazzo/booking_system/booking/email.ex @@ -18,6 +18,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.Email do customer_phone: customer_phone, customer_comment: customer_comment, space_name: space_name, + space_slug: space_slug, date: date, start_time: start_time, end_time: end_time @@ -31,6 +32,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.Email do customer_phone: customer_phone, customer_comment: customer_comment, space_name: space_name, + space_slug: space_slug, date: date, start_time: start_time, end_time: end_time, @@ -115,6 +117,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.Email do customer_email: customer_email, customer_phone: customer_phone, space_name: space_name, + space_slug: space_slug, date: date, start_time: start_time, end_time: end_time @@ -127,6 +130,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.Email do customer_email: customer_email, customer_phone: customer_phone, space_name: space_name, + space_slug: space_slug, date: date, start_time: start_time, end_time: end_time, diff --git a/lib/spazio_solazzo/booking_system/booking/request_created_email_worker.ex b/lib/spazio_solazzo/booking_system/booking/request_created_email_worker.ex index 1a881c4..f877f36 100644 --- a/lib/spazio_solazzo/booking_system/booking/request_created_email_worker.ex +++ b/lib/spazio_solazzo/booking_system/booking/request_created_email_worker.ex @@ -18,6 +18,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.RequestCreatedEmailWorker do "customer_phone" => customer_phone, "customer_comment" => customer_comment, "space_name" => space_name, + "space_slug" => space_slug, "start_datetime" => start_datetime_str, "end_datetime" => end_datetime_str } @@ -32,6 +33,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.RequestCreatedEmailWorker do customer_phone: customer_phone, customer_comment: customer_comment, space_name: space_name, + space_slug: space_slug, start_datetime: start_datetime, end_datetime: end_datetime, date: CalendarExt.format_datetime_date_only(start_datetime), diff --git a/lib/spazio_solazzo_web/components/landing_components.ex b/lib/spazio_solazzo_web/components/landing_components.ex index 4a132eb..14ef019 100644 --- a/lib/spazio_solazzo_web/components/landing_components.ex +++ b/lib/spazio_solazzo_web/components/landing_components.ex @@ -112,8 +112,6 @@ defmodule SpazioSolazzoWeb.LandingComponents do title="Meeting Room" description="A private, sun-drenched sanctuary designed for focus and collaboration." booking_path={~p"/book/asset/\#{@asset.id}"} - price="€40" - price_unit="hour" capacity="Up to 8 People" images={@images} /> @@ -122,8 +120,6 @@ defmodule SpazioSolazzoWeb.LandingComponents do slot :description, required: true attr :booking_path, :string, required: true attr :booking_label, :string, default: "Book This Room" - attr :price, :string, required: true - attr :price_unit, :string, default: "hour" attr :capacity, :string, required: true attr :images, :list, default: [] @@ -145,18 +141,14 @@ defmodule SpazioSolazzoWeb.LandingComponents do

{render_slot(@description)}

-
+
<.link navigate={@booking_path} - class="btn btn-primary h-14 px-8 rounded-2xl text-lg font-bold shadow-xl w-full sm:w-auto hover:-translate-y-1" + class="btn btn-primary h-14 px-8 rounded-2xl text-lg font-bold shadow-xl hover:-translate-y-1" > {@booking_label} <.icon name="hero-arrow-right" class="w-5 h-5" /> -
- {@price} - / {@price_unit} -
diff --git a/lib/spazio_solazzo_web/components/page_components.ex b/lib/spazio_solazzo_web/components/page_components.ex index 68b2e81..7eb9854 100644 --- a/lib/spazio_solazzo_web/components/page_components.ex +++ b/lib/spazio_solazzo_web/components/page_components.ex @@ -14,8 +14,6 @@ defmodule SpazioSolazzoWeb.PageComponents do <.space_card title="Coworking" description="Flexible desk spaces for remote work" - price="15" - time_unit="4 hours" image_url="https://..." primary_label="Workspace" image_position={:left} @@ -26,8 +24,6 @@ defmodule SpazioSolazzoWeb.PageComponents do <.space_card title="Meeting Room" description="Private conference rooms" - price="40" - time_unit="hour" image_url="https://..." primary_label="Business" primary_label_variant={:secondary} @@ -39,8 +35,6 @@ defmodule SpazioSolazzoWeb.PageComponents do """ attr :title, :string, required: true attr :description, :string, required: true - attr :price, :string, required: true - attr :time_unit, :string, required: true attr :image_url, :string, required: true attr :primary_label, :string, required: true attr :primary_label_variant, :atom, default: :primary, values: [:primary, :secondary, :accent] @@ -101,14 +95,10 @@ defmodule SpazioSolazzoWeb.PageComponents do <% end %>

-
- - €{@price} - / {@time_unit} - +
<.link navigate={@booking_url} - class="btn btn-primary h-10 px-5 rounded-2xl uppercase text-xs tracking-widest" + class="btn btn-primary h-12 px-8 rounded-2xl uppercase text-xs tracking-widest" > View more <.icon name="hero-arrow-right" class="size-5" /> diff --git a/lib/spazio_solazzo_web/emails/email_templates/booking_request_approved.html.heex b/lib/spazio_solazzo_web/emails/email_templates/booking_request_approved.html.heex index 4680198..e55de41 100644 --- a/lib/spazio_solazzo_web/emails/email_templates/booking_request_approved.html.heex +++ b/lib/spazio_solazzo_web/emails/email_templates/booking_request_approved.html.heex @@ -13,6 +13,53 @@ <.detail_item label="Phone">{@customer_phone || "N/A"} +
+

+ 💰 Pricing Information +

+ <%= cond do %> + <% @space_slug == "arcipelago" -> %> +

+ €5 for half day (up to 4 hours)
+ €9 for full day (more than 4 hours) +

+ <% @space_slug == "media-room" -> %> +

+ €15 per hour +

+ <% @space_slug == "hall" -> %> +

+ €5 per person for the entire time slot +

+ <% true -> %> +

+ Pricing information will be confirmed shortly. +

+ <% end %> +
+ +
+

💳 Payment Information

+

+ Payment can be made on arrival via: +

+
    +
  • Cash
  • +
  • POS (card payment)
  • +
+
+ +<%= if @space_slug == "arcipelago" do %> +
+

+ 👥 Membership Required +

+

+ The coworking space is for Caravanserai association members only. Membership costs €3 and can be completed at the space. Your membership will be valid until December 31, 2026. +

+
+<% end %> +

✅ Your booking is confirmed! Please arrive on time. diff --git a/lib/spazio_solazzo_web/emails/email_templates/user_booking_request_confirmation.html.heex b/lib/spazio_solazzo_web/emails/email_templates/user_booking_request_confirmation.html.heex index 83eaa2f..069a234 100644 --- a/lib/spazio_solazzo_web/emails/email_templates/user_booking_request_confirmation.html.heex +++ b/lib/spazio_solazzo_web/emails/email_templates/user_booking_request_confirmation.html.heex @@ -14,6 +14,53 @@ <.detail_item label="Note">{@customer_comment || "N/A"} +

+

+ 💰 Pricing Information +

+ <%= cond do %> + <% @space_slug == "arcipelago" -> %> +

+ €5 for half day (up to 4 hours)
+ €9 for full day (more than 4 hours) +

+ <% @space_slug == "media-room" -> %> +

+ €15 per hour +

+ <% @space_slug == "hall" -> %> +

+ €5 per person for the entire time slot +

+ <% true -> %> +

+ Pricing information will be confirmed shortly. +

+ <% end %> +
+ +
+

💳 Payment Information

+

+ Payment can be made on arrival via: +

+
    +
  • Cash
  • +
  • POS (card payment)
  • +
+
+ +<%= if @space_slug == "arcipelago" do %> +
+

+ 👥 Membership Required +

+

+ The coworking space is for Caravanserai association members only. Membership costs €3 and can be completed at the space. Your membership will be valid until December 31, 2026. +

+
+<% end %> +

⏳ Your request is pending approval. You will receive an email once an administrator reviews your request. diff --git a/lib/spazio_solazzo_web/live/booking/booking_form_live_component.ex b/lib/spazio_solazzo_web/live/booking/booking_form_live_component.ex index 5be96be..f476dfc 100644 --- a/lib/spazio_solazzo_web/live/booking/booking_form_live_component.ex +++ b/lib/spazio_solazzo_web/live/booking/booking_form_live_component.ex @@ -130,13 +130,30 @@ defmodule SpazioSolazzoWeb.BookingFormLiveComponent do

    +
  • Pricing details will be sent to your email
  • +
  • Payment via cash or POS on arrival
  • Cancel anytime with no commitment
  • -
  • Payment upon arrival only
+ <%= if @space.slug == "arcipelago" do %> +
+
+
+ <.icon name="hero-user-group" class="size-5 text-warning" /> +
+
+

Membership Required

+

+ Coworking is for Caravanserai association members. Membership costs €3, can be done at the space, and is valid until December 31, 2026. +

+
+
+
+ <% end %> +
+
+
+
+ <.icon name="hero-envelope" class="size-5 text-info" /> +
+
+

Pricing Information

+

+ When you submit your booking request, you will receive an email with price information. Payment can be made on arrival via cash or POS. +

+
+
+
+

Available Time Slots diff --git a/lib/spazio_solazzo_web/live/landing/coworking_live.html.heex b/lib/spazio_solazzo_web/live/landing/coworking_live.html.heex index ef61825..215c8ae 100644 --- a/lib/spazio_solazzo_web/live/landing/coworking_live.html.heex +++ b/lib/spazio_solazzo_web/live/landing/coworking_live.html.heex @@ -2,8 +2,6 @@ <.page_header booking_path={~p"/book/space/#{@space.slug}"} booking_label="Request a desk" - price="€25" - price_unit="day" capacity={@space.capacity} images={[ ~p"/images/coworking_room/01.jpg", @@ -18,6 +16,35 @@ +
+
+
+
+
+ <.icon name="hero-user-group" class="size-6 text-warning" /> +
+
+

Membership Required

+

+ The coworking space is for Caravanserai association members + only. If you're not yet a member, don't worry! +

+
+

+ 💳 Membership Details: +

+
    +
  • Cost: €3
  • +
  • Can be completed directly at the space
  • +
  • Valid until December 31, 2026
  • +
+
+
+
+
+
+
+ <.features_section title="Everything for the modern nomad" description="We've curated the perfect environment for productivity, ensuring you have the tools to thrive in Sicily." 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 a85b200..ac293e8 100644 --- a/lib/spazio_solazzo_web/live/landing/meeting_live.html.heex +++ b/lib/spazio_solazzo_web/live/landing/meeting_live.html.heex @@ -2,8 +2,6 @@ <.page_header booking_path={~p"/book/space/#{@space.slug}"} booking_label="Booking request" - price="€35" - price_unit="hour" capacity="8" images={[ ~p"/images/meeting_room/01.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 4529909..f4f2385 100644 --- a/lib/spazio_solazzo_web/live/landing/music_live.html.heex +++ b/lib/spazio_solazzo_web/live/landing/music_live.html.heex @@ -2,8 +2,6 @@ <.page_header booking_path={~p"/book/space/#{@space.slug}"} booking_label="Booking request" - price="€50" - price_unit="hour" capacity="8" images={[ ~p"/images/music_room/01.jpg", diff --git a/lib/spazio_solazzo_web/live/page_live.html.heex b/lib/spazio_solazzo_web/live/page_live.html.heex index 1652ab2..327f22c 100644 --- a/lib/spazio_solazzo_web/live/page_live.html.heex +++ b/lib/spazio_solazzo_web/live/page_live.html.heex @@ -51,8 +51,6 @@ id="coworking" title={@coworking_space.name} description={@coworking_space.description} - price="15" - time_unit="4 hours" image_url={~p"/images/coworking_room/01.jpg"} primary_label="Coworking" primary_label_variant={:secondary} @@ -66,8 +64,6 @@ id="meeting" title={@meeting_space.name} description={@meeting_space.description} - price="40" - time_unit="hour" image_url={~p"/images/meeting_room/01.jpg"} primary_label="Meeting" primary_label_variant={:secondary} @@ -83,8 +79,6 @@ id="music" title={@music_space.name} description={@music_space.description} - price="25" - time_unit="hour" image_url={~p"/images/music_room/01.jpg"} primary_label="Music" primary_label_variant={:primary} diff --git a/test/spazio_solazzo/booking_system/booking/request_created_email_worker_test.exs b/test/spazio_solazzo/booking_system/booking/request_created_email_worker_test.exs index a6a3cb3..ba59aeb 100644 --- a/test/spazio_solazzo/booking_system/booking/request_created_email_worker_test.exs +++ b/test/spazio_solazzo/booking_system/booking/request_created_email_worker_test.exs @@ -13,6 +13,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.RequestCreatedEmailWorkerTest do "customer_phone" => "+1234567890", "customer_comment" => "Test comment", "space_name" => "Coworking Space", + "space_slug" => "arcipelago", "start_datetime" => "2026-02-02T09:00:00Z", "end_datetime" => "2026-02-02T13:00:00Z" } @@ -35,6 +36,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.RequestCreatedEmailWorkerTest do "customer_phone" => "+1234567890", "customer_comment" => "Test comment", "space_name" => "Coworking Space", + "space_slug" => "arcipelago", "start_datetime" => "2026-02-02T09:00:00Z", "end_datetime" => "2026-02-02T13:00:00Z" } @@ -59,6 +61,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.RequestCreatedEmailWorkerTest do "customer_phone" => "+1234567890", "customer_comment" => "Another test", "space_name" => "Meeting Room", + "space_slug" => "media-room", "start_datetime" => "2026-02-03T14:00:00Z", "end_datetime" => "2026-02-03T18:00:00Z" } @@ -84,6 +87,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.RequestCreatedEmailWorkerTest do "customer_phone" => "+1234567890", "customer_comment" => "Test", "space_name" => "Music Room", + "space_slug" => "hall", "start_datetime" => "2026-02-04T10:00:00Z", "end_datetime" => "2026-02-04T12:00:00Z" } @@ -110,6 +114,7 @@ defmodule SpazioSolazzo.BookingSystem.Booking.RequestCreatedEmailWorkerTest do "customer_phone" => "+1234567890", "customer_comment" => "Admin comment", "space_name" => "Coworking Space", + "space_slug" => "arcipelago", "start_datetime" => "2026-02-05T09:00:00Z", "end_datetime" => "2026-02-05T11:00:00Z" } diff --git a/test/spazio_solazzo/booking_system/booking_test.exs b/test/spazio_solazzo/booking_system/booking_test.exs index acd1689..2dbcc5d 100644 --- a/test/spazio_solazzo/booking_system/booking_test.exs +++ b/test/spazio_solazzo/booking_system/booking_test.exs @@ -15,7 +15,7 @@ defmodule SpazioSolazzo.BookingSystem.BookingTest do user = register_user("testuser@example.com", "Test User") - date = ~D[2026-02-10] + date = Date.add(Date.utc_today(), 7) %{space: space, user: user, date: date} end