diff --git a/dlunch/core.py b/dlunch/core.py index f3f1978..be69363 100644 --- a/dlunch/core.py +++ b/dlunch/core.py @@ -346,14 +346,14 @@ def reload_menu( ) # Add order (for selecting items) and note columns df["order"] = False - df["note"] = "" + df[config.panel.gui.note_column_name] = "" gi.dataframe.value = df gi.dataframe.formatters = {"order": {"type": "tickCross"}} gi.dataframe.editors = { "id": None, "item": None, "order": CheckboxEditor(), - "note": "input", + config.panel.gui.note_column_name: "input", } gi.dataframe.header_align = OmegaConf.to_container( config.panel.gui.menu_column_align, resolve=True @@ -693,7 +693,9 @@ def send_order( user=username_key_press, lunch_time=person.lunch_time, menu_item_id=row.Index, - note=row.note.lower(), + note=getattr( + row, config.panel.gui.note_column_name + ).lower(), ) session.add(new_order) session.commit() diff --git a/dlunch/gui.py b/dlunch/gui.py index 30381da..cb111fd 100644 --- a/dlunch/gui.py +++ b/dlunch/gui.py @@ -351,7 +351,7 @@ def reload_on_guest_override_callback( # Create dataframe instance self.dataframe = pnw.Tabulator( name="Order", - widths={"note": 180}, + widths={config.panel.gui.note_column_name: 180}, selectable=False, stylesheets=[config.panel.gui.css_files.custom_tabulator_path], )