refactor: replace month dropdown with week dropdown and update related components

feat: add feedback functionality and modal for category feedback
style: add feedback button styles in CSS
docs: add explanation tab for dashboard usage instructions
This commit is contained in:
2025-09-07 20:16:56 +02:00
parent 2d73ae8d63
commit e1b817252c
14 changed files with 281 additions and 90 deletions

View File

@ -7,6 +7,7 @@ class DataSchema:
DATE = "date"
MONTH = "month"
YEAR = "year"
WEEK = "week"
def load_transaction_data(path: str) -> pd.DataFrame:
@ -22,4 +23,8 @@ def load_transaction_data(path: str) -> pd.DataFrame:
)
data[DataSchema.YEAR] = data[DataSchema.DATE].dt.year.astype(str)
data[DataSchema.MONTH] = data[DataSchema.DATE].dt.month.astype(str)
return data
data[DataSchema.WEEK] = (
data[DataSchema.DATE].dt.isocalendar().year.astype(str)
+ data[DataSchema.DATE].dt.isocalendar().week.astype(str).str.zfill(2)
)
return data

View File

@ -6,6 +6,7 @@ class DataSchema:
DATE = "date"
MONTH = "month"
YEAR = "year"
WEEK = "week"
class SPC_Schema:
FC = "FC"
@ -30,4 +31,8 @@ def load_spc_data(path: str) -> pd.DataFrame:
)
data[DataSchema.YEAR] = data[DataSchema.DATE].dt.year.astype(str)
data[DataSchema.MONTH] = data[DataSchema.DATE].dt.month.astype(str)
return data
data[DataSchema.WEEK] = (
data[DataSchema.DATE].dt.isocalendar().year.astype(str)
+ data[DataSchema.DATE].dt.isocalendar().week.astype(str).str.zfill(2)
)
return data