Skip to content

Commit

Permalink
Merge pull request #88 from otakulan/feature/tgh/hotfix-station-display
Browse files Browse the repository at this point in the history
Make station layout rotation display properly
  • Loading branch information
starcraft66 authored Aug 3, 2024
2 parents 00246ed + 5cc71a8 commit eb7028e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion lib/lanpartyseating/logic/station_logic.ex
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ defmodule Lanpartyseating.StationLogic do
%{station_number: station_number, display_order: station_number, inserted_at: now_naive, updated_at: now_naive}
end)
end)
|> IO.inspect

Repo.insert_all(Station, positions)
:ok
Expand Down
4 changes: 2 additions & 2 deletions lib/lanpartyseating_web/live/cancellation_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ defmodule LanpartyseatingWeb.CancellationLive do

socket =
socket
|> assign(:columns, settings.columns)
|> assign(:rows, settings.rows)
|> assign(:columns, if(settings.is_diagonally_mirrored, do: settings.rows, else: settings.columns))
|> assign(:rows, if(settings.is_diagonally_mirrored, do: settings.columns, else: settings.rows))
|> assign(:col_trailing, settings.vertical_trailing)
|> assign(:row_trailing, settings.horizontal_trailing)
|> assign(:colpad, settings.column_padding)
Expand Down
4 changes: 2 additions & 2 deletions lib/lanpartyseating_web/live/display_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ defmodule LanpartyseatingWeb.DisplayLive do

socket =
socket
|> assign(:columns, settings.columns)
|> assign(:rows, settings.rows)
|> assign(:columns, if(settings.is_diagonally_mirrored, do: settings.rows, else: settings.columns))
|> assign(:rows, if(settings.is_diagonally_mirrored, do: settings.columns, else: settings.rows))
|> assign(:col_trailing, settings.vertical_trailing)
|> assign(:row_trailing, settings.horizontal_trailing)
|> assign(:colpad, settings.column_padding)
Expand Down
4 changes: 2 additions & 2 deletions lib/lanpartyseating_web/live/selfsign_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ defmodule LanpartyseatingWeb.SelfSignLive do

socket =
socket
|> assign(:columns, settings.columns)
|> assign(:rows, settings.rows)
|> assign(:columns, if(settings.is_diagonally_mirrored, do: settings.rows, else: settings.columns))
|> assign(:rows, if(settings.is_diagonally_mirrored, do: settings.columns, else: settings.rows))
|> assign(:col_trailing, settings.vertical_trailing)
|> assign(:row_trailing, settings.horizontal_trailing)
|> assign(:colpad, settings.column_padding)
Expand Down
3 changes: 2 additions & 1 deletion lib/lanpartyseating_web/live/settings_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ defmodule LanpartyseatingWeb.SettingsLive do
socket
|> assign(:rows, socket.assigns.rows)
|> assign(:columns, socket.assigns.columns)
|> assign(:is_diagnoally_mirrored, !socket.assigns.is_diagonally_mirrored)
|> assign(:table, transpose(socket.assigns.table))

{:noreply, socket}
Expand All @@ -176,7 +177,7 @@ defmodule LanpartyseatingWeb.SettingsLive do

:ok = Lanpartyseating.StationLogic.save_station_positions(socket.assigns.table)

{:ok, _} = Lanpartyseating.SettingsLogic.save_settings(
:ok = Lanpartyseating.SettingsLogic.save_settings(
s.rows,
s.columns,
s.rowpad,
Expand Down

0 comments on commit eb7028e

Please sign in to comment.