Spaces:
Runtime error
Runtime error
add simple webapp to record working hours
Browse files
Makefile
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
all:
|
2 |
+
streamlit run app.py
|
app.py
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from uoh_software_project_time_report.project import *
|
3 |
+
|
4 |
+
GSHEET_URL = "https://docs.google.com/spreadsheets/d/1DNoNf4glcuMxKoVzHVrFo-MktmsVji1wf4IHeraWH84/edit?usp=sharing"
|
5 |
+
|
6 |
+
st.set_page_config(page_title="Project Time report", layout="centered")
|
7 |
+
|
8 |
+
st.write('XXXXX Add dash board with KPI panels here! (e.g. total time spent, remaining time, velocity, e.t.c)')
|
9 |
+
|
10 |
+
st.title("Project Time report!")
|
11 |
+
|
12 |
+
pr = Project('keys.json')
|
13 |
+
|
14 |
+
|
15 |
+
form = st.form(key="annotation")
|
16 |
+
with form:
|
17 |
+
cols = st.columns((1, 1))
|
18 |
+
author = cols[0].selectbox(
|
19 |
+
"Name:", ["",
|
20 |
+
"Arttu I Lehtonen",
|
21 |
+
"Borna Jamali",
|
22 |
+
"Leevi J A Takala",
|
23 |
+
"Matias Tolppanen",
|
24 |
+
"Nella T Nieminen",
|
25 |
+
"Tuula Jakobsson Peralta",
|
26 |
+
"Machihito Mizutani",
|
27 |
+
"Roberto Morabito",
|
28 |
+
"Hiroshi Doyu",
|
29 |
+
"Anastasia C Diseth",
|
30 |
+
], index=0
|
31 |
+
)
|
32 |
+
binum = cols[1].text_input("Backlog item # (meeting=='0'):")
|
33 |
+
cols = st.columns(2)
|
34 |
+
date = cols[0].date_input("work date:")
|
35 |
+
hours = cols[1].slider("Time spent (hours):", 1., 7.5, step=0.5)
|
36 |
+
comment = st.text_area("Comment:")
|
37 |
+
submitted = st.form_submit_button(label="Submit")
|
38 |
+
|
39 |
+
if submitted:
|
40 |
+
pr.append([[author, binum, hours, str(date), comment]])
|
41 |
+
st.success("Thanks! Your time was recorded.")
|
42 |
+
st.balloons()
|
43 |
+
|
44 |
+
expander = st.expander("See all records")
|
45 |
+
with expander:
|
46 |
+
st.write(f"Open original [Google Sheet]({GSHEET_URL})")
|
47 |
+
st.dataframe(pr.get())
|