diff --git a/lib/mv_web/live/import_live.ex b/lib/mv_web/live/import_live.ex index 2b2a58f..2e32f8e 100644 --- a/lib/mv_web/live/import_live.ex +++ b/lib/mv_web/live/import_live.ex @@ -93,11 +93,11 @@ defmodule MvWeb.ImportLive do <%= if Authorization.can?(@current_user, :create, Mv.Membership.Member) do %> <%!-- CSV Import Section --%> <.header> - {gettext("Import Members (CSV)")} - <:subtitle> - {gettext("Import members from CSV files.")} - - + {gettext("Import Members (CSV)")} + <:subtitle> + {gettext("Import members from CSV files.")} + + <.form_section title={gettext("Datei auswählen")}> diff --git a/lib/mv_web/live/import_live/components.ex b/lib/mv_web/live/import_live/components.ex index 9d5db4f..93dc154 100644 --- a/lib/mv_web/live/import_live/components.ex +++ b/lib/mv_web/live/import_live/components.ex @@ -25,7 +25,7 @@ defmodule MvWeb.ImportLive.Components do

{gettext( - "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, because unknown data field columns will be ignored. Groups and membership fees are not supported for import." + "Use the data field name as the CSV column header in your file. Data fields must exist in Mila before importing, because unknown data field columns will be ignored with a warning. Groups and membership fees are not supported for import." )}

diff --git a/priv/pdf_templates/members_export.typ b/priv/pdf_templates/members_export.typ index 5dca208..33b793e 100644 --- a/priv/pdf_templates/members_export.typ +++ b/priv/pdf_templates/members_export.typ @@ -9,7 +9,13 @@ #set page( paper: "a4", flipped: true, - margin: (top: 1.2cm, bottom: 1.2cm, left: 1.0cm, right: 1.0cm) + margin: (top: 1.2cm, bottom: 1.2cm, left: 1.0cm, right: 1.0cm), + numbering: "1", + footer: context [ + #set text(size: 8pt) + #set align(center) + #counter(page).display("1 / 1", both: true) + ] ) #set text(size: 9pt, hyphenate: true) @@ -58,7 +64,6 @@ #let start = fixed_count + chunk_index * max_dynamic_cols #let page_cols = fixed_cols + dyn_cols_chunk - #let headers = page_cols.map(c => c.at("label", default: "")) // widths: first two columns fixed (32mm, 42mm), rest distributed as 1fr #let widths = ( @@ -67,9 +72,9 @@ ..((1fr,) * dyn_count) ) - #let header_cells = headers.map(h => text(weight: "bold", size: 9pt)[#h]) + #let header_cells = page_cols.map(c => text(weight: "bold", size: 9pt)[#c.at("label", default: "")]) - // Body cells (row-major), nur die Spalten dieses Chunks + // Body cells (row-major), only columns of this chunk #let body_cells = ( rows .map(row => row.slice(0, fixed_count) + row.slice(start, start + dyn_count)) @@ -77,8 +82,27 @@ .flatten() ) + // Thinner grid for body; thicker vertical line between column 2 and 3; header and outer borders thick + #let thin_stroke = 0.3pt + black + #let thick_sep = 1.5pt + black + #let thick_stroke = 1pt + black + #let last_x = fixed_count + dyn_count - 1 + #let last_y = rows.len() + #let stroke_fn = (x, y) => { + let top = if y == 0 or y == 1 { thick_stroke } else { thin_stroke } + let bottom = if y == 0 or y == last_y { thick_stroke } else { thin_stroke } + let left = if x == 0 { thick_stroke } else if x == 2 { thick_sep } else { thin_stroke } + let right = if x == last_x { thick_stroke } else { thin_stroke } + (top: top, bottom: bottom, left: left, right: right) + } + + // Light gray background for first two columns (first_name, last_name) + #let fill_fn = (x, y) => if x < 2 { rgb("f2f2f2") } else { none } + #table( columns: widths, + stroke: stroke_fn, + fill: fill_fn, table.header(..header_cells), ..body_cells, )