Upload 6 files
Browse files
components/__pycache__/card.cpython-312.pyc
CHANGED
|
Binary files a/components/__pycache__/card.cpython-312.pyc and b/components/__pycache__/card.cpython-312.pyc differ
|
|
|
components/card.py
CHANGED
|
@@ -18,7 +18,7 @@ def render_card(index: int, on_save, on_delete) -> None:
|
|
| 18 |
badge = "Saved" if card.get("id") else "Draft"
|
| 19 |
st.markdown(f'<div class="card-status">{badge}</div>', unsafe_allow_html=True)
|
| 20 |
|
| 21 |
-
title_col,
|
| 22 |
with title_col:
|
| 23 |
card["title"] = st.text_input(
|
| 24 |
"Title",
|
|
@@ -27,24 +27,21 @@ def render_card(index: int, on_save, on_delete) -> None:
|
|
| 27 |
placeholder="Morning Shift",
|
| 28 |
)
|
| 29 |
|
| 30 |
-
with
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
card["startMinute"]
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
index=MINUTE_OPTIONS.index(card["startMinute"]),
|
| 46 |
-
key=minute_key,
|
| 47 |
-
)
|
| 48 |
|
| 49 |
end_hour, end_minute = compute_end_time(card["startHour"], card["startMinute"])
|
| 50 |
card["endHour"] = end_hour
|
|
|
|
| 18 |
badge = "Saved" if card.get("id") else "Draft"
|
| 19 |
st.markdown(f'<div class="card-status">{badge}</div>', unsafe_allow_html=True)
|
| 20 |
|
| 21 |
+
title_col, hour_col, minute_col, end_col = st.columns([1.25, 0.52, 0.52, 0.72])
|
| 22 |
with title_col:
|
| 23 |
card["title"] = st.text_input(
|
| 24 |
"Title",
|
|
|
|
| 27 |
placeholder="Morning Shift",
|
| 28 |
)
|
| 29 |
|
| 30 |
+
with hour_col:
|
| 31 |
+
card["startHour"] = st.selectbox(
|
| 32 |
+
"Hour",
|
| 33 |
+
options=HOUR_OPTIONS,
|
| 34 |
+
index=HOUR_OPTIONS.index(card["startHour"]),
|
| 35 |
+
key=hour_key,
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
with minute_col:
|
| 39 |
+
card["startMinute"] = st.selectbox(
|
| 40 |
+
"Minute",
|
| 41 |
+
options=MINUTE_OPTIONS,
|
| 42 |
+
index=MINUTE_OPTIONS.index(card["startMinute"]),
|
| 43 |
+
key=minute_key,
|
| 44 |
+
)
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
end_hour, end_minute = compute_end_time(card["startHour"], card["startMinute"])
|
| 47 |
card["endHour"] = end_hour
|