HansTran commited on
Commit
94c7310
·
verified ·
1 Parent(s): aa0d878

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, time_col, end_col = st.columns([1.2, 1.0, 0.72])
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 time_col:
31
- hour_col, colon_col, minute_col = st.columns([1, 0.18, 1])
32
- with hour_col:
33
- card["startHour"] = st.selectbox(
34
- "Hour",
35
- options=HOUR_OPTIONS,
36
- index=HOUR_OPTIONS.index(card["startHour"]),
37
- key=hour_key,
38
- )
39
- with colon_col:
40
- st.markdown('<div class="time-colon">:</div>', unsafe_allow_html=True)
41
- with minute_col:
42
- card["startMinute"] = st.selectbox(
43
- "Minute",
44
- options=MINUTE_OPTIONS,
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