From 52fab76c8443c5f99f92705b1b50b74e68c4ebde Mon Sep 17 00:00:00 2001 From: Nuno Miguel Date: Thu, 19 Sep 2024 15:43:43 +0100 Subject: [PATCH] chore: run mix format --- .../live/calendar_live/components/month.ex | 56 +++++++++---------- .../live/calendar_live/components/week.ex | 11 ++-- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/lib/atomic_web/live/calendar_live/components/month.ex b/lib/atomic_web/live/calendar_live/components/month.ex index 2620ea36..7ef4b728 100644 --- a/lib/atomic_web/live/calendar_live/components/month.ex +++ b/lib/atomic_web/live/calendar_live/components/month.ex @@ -40,28 +40,28 @@ defmodule AtomicWeb.CalendarLive.Components.CalendarMonth do
- <.day :for={date <- generate_days_list(@beginning_of_month, @end_of_month)} params={@params} date={date} current_date={@current_date} activities={@activities} timezone={@timezone} /> + <.day :for={date <- generate_days_list(@beginning_of_month, @end_of_month)} params={@params} date={date} current_date={@current_date} activities={@activities} timezone={@timezone} />
<%= if length(get_date_activities(@activities, @current_date)) > 0 do %>
    -
  1. - <.link patch={Routes.activity_show_path(AtomicWeb.Endpoint, :show, activity)} class="group flex justify-between p-4 pr-6 focus-within:bg-gray-50 hover:bg-gray-50"> -
    -

    - <%= activity.title %> -

    -
    - -
    +
  2. + <.link patch={Routes.activity_show_path(AtomicWeb.Endpoint, :show, activity)} class="group flex justify-between p-4 pr-6 focus-within:bg-gray-50 hover:bg-gray-50"> +
    +

    + <%= activity.title %> +

    +
    +
    - -
  3. +
+ + <% end %> @@ -142,19 +142,19 @@ defmodule AtomicWeb.CalendarLive.Components.CalendarMonth do <%= @text %>
    -
  1. Enum.take(2)}> - <.link patch={Routes.activity_show_path(AtomicWeb.Endpoint, :show, activity)} class="group flex"> -

    - <%= activity.title %> -

    - - -
  2. -
  3. 2} class="text-zinc-500 hover:text-primary-600"> - -
  4. +
  5. Enum.take(2)}> + <.link patch={Routes.activity_show_path(AtomicWeb.Endpoint, :show, activity)} class="group flex"> +

    + <%= activity.title %> +

    + + +
  6. +
  7. 2} class="text-zinc-500 hover:text-primary-600"> + +
<.link diff --git a/lib/atomic_web/live/calendar_live/components/week.ex b/lib/atomic_web/live/calendar_live/components/week.ex index 4836dfb9..4f54bf1d 100644 --- a/lib/atomic_web/live/calendar_live/components/week.ex +++ b/lib/atomic_web/live/calendar_live/components/week.ex @@ -15,11 +15,12 @@ defmodule AtomicWeb.CalendarLive.Components.CalendarWeek do attr :params, :map, required: true def calendar_week(%{timezone: timezone} = assigns) do - days_of_week = for idx <- 0..6 do - day_of_week = assigns.beginning_of_week |> Timex.add(Duration.from_days(idx)) - day_of_week_mobile = Enum.at(["M", "T", "W", "T", "F", "S", "S"], idx) - {day_of_week, day_of_week_mobile} - end + days_of_week = + for idx <- 0..6 do + day_of_week = assigns.beginning_of_week |> Timex.add(Duration.from_days(idx)) + day_of_week_mobile = Enum.at(["M", "T", "W", "T", "F", "S", "S"], idx) + {day_of_week, day_of_week_mobile} + end assigns = assigns