Skip to content

Commit

Permalink
Merge pull request #135 from Michele-Alberti/development
Browse files Browse the repository at this point in the history
🗒️ Move notes to order items
  • Loading branch information
Michele-Alberti authored Mar 17, 2024
2 parents 5166459 + 33e45a1 commit f17904e
Show file tree
Hide file tree
Showing 14 changed files with 188 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- name: Bump and changelog
id: cz
uses: commitizen-tools/commitizen-action@0.20.0
uses: commitizen-tools/commitizen-action@0.21.0
with:
github_token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
prerelease: "${{ steps.vars.outputs.pre_release }}"
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.15.0
rev: v3.18.3
hooks:
- id: commitizen
stages: [commit-msg]
Expand Down
7 changes: 4 additions & 3 deletions dlunch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ def create_app(config: DictConfig) -> pn.Template:
config, add_basic_auth_users=auth.is_basic_auth_active(config=config)
)

log.info("initialize support variables")
# Generate a random password only if requested (check on flag)
log.info("set user password")
log.debug("config guest user")
guest_password = core.set_guest_user_password(config)

log.info("instantiate Panel app")
log.info("instantiate app")

# Panel configurations
log.debug("set toggle initial state")
log.debug("set toggles initial state")
# Set the no_more_orders flag if it is None (not found in flags table)
if models.get_flag(config=config, id="no_more_orders") is None:
models.set_flag(config=config, id="no_more_orders", value=False)
Expand Down
2 changes: 1 addition & 1 deletion dlunch/conf/db/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ url: ${db.dialect}+${db.driver}://${db.username}:${db.password}@${db.host}:${db.
# QUERIES
# Orders
orders_query: |-
SELECT o.user, o.lunch_time, m.item
SELECT o.user, o.lunch_time, m.item, o.note
FROM {schema}.orders o
LEFT JOIN {schema}.menu m
ON m.id = o.menu_item_id;
Expand Down
2 changes: 1 addition & 1 deletion dlunch/conf/db/sqlite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ url: ${db.dialect}:///${db.db_path}
# QUERIES
# Orders
orders_query: |-
SELECT o.user, o.lunch_time, m.item
SELECT o.user, o.lunch_time, m.item, o.note
FROM orders o
LEFT JOIN menu m
ON m.id = o.menu_item_id;
Expand Down
2 changes: 1 addition & 1 deletion dlunch/conf/panel/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ additional_items_to_concat:
- name: Altro
short_name: Altro
icon: 🃏
description: richieste speciali (da specificare nelle note).
description: richieste speciali (da specificare nella colonna note).
guest_types: # Check also guests icons in panel/gui
- Edison Guest
- External Guest
Expand Down
14 changes: 14 additions & 0 deletions dlunch/conf/panel/gui/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,23 @@ takeaway_svg_icon: |-
</svg>
takeaway_alert_text_options: 'class="flashing-animation"'

# MENU TABLE
# Table column alignment
menu_column_align:
id: center
item: left
order: center
note: left

# ORDERS' TABLE
# Name of the column with total values for orders
total_column_name: totale
# Name of the column with notes for orders
note_column_name: note
# Note separators
note_sep:
count: " " # Between note and counter
element: ", " # Between notes

# CUSTOMIZABLE GRAPHIC OBJECTS
# Instantiate a panel object to be rendered on app's header
Expand Down
2 changes: 1 addition & 1 deletion dlunch/conf/panel/gui/major_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defaults:
- default

# APP
version: 2
version: 3
title: Data-Lunch&nbsp&nbsp&nbsp V${panel.gui.version}

# CUSTOMIZABLE GRAPHIC OBJECTS
Expand Down
1 change: 0 additions & 1 deletion dlunch/conf/panel/gui/women_day.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ header_object:
style:
background-color: white
border-radius: 2rem
padding: 0.3rem
height: 50px
width: 50px
display: inline-block
Loading

0 comments on commit f17904e

Please sign in to comment.