From 3fab130ae0293120105371fcbc1292a18d21427c Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Sat, 2 Nov 2024 12:33:27 -0700 Subject: [PATCH] Implement some basic features --- .gitignore | 1 + availabili.tf/.env.development | 1 + availabili.tf/src/App.vue | 12 + availabili.tf/src/assets/main.css | 17 +- availabili.tf/src/cacheable.ts | 23 ++ .../src/components/AvailabilityGrid.vue | 20 +- .../src/components/WeekSelectionBox.vue | 8 +- availabili.tf/src/router/index.ts | 6 + availabili.tf/src/stores/auth.ts | 38 +++ availabili.tf/src/stores/schedule.ts | 49 +++- availabili.tf/src/stores/teams.ts | 36 +++ availabili.tf/src/views/LoginView.vue | 48 ++++ availabili.tf/src/views/ScheduleView.vue | 47 +++- availabili.tf/vite.config.ts | 24 ++ backend-flask/.env | 1 + backend-flask/app.py | 30 +++ backend-flask/forms.py | 7 + backend-flask/login.py | 137 ++++++++++ backend-flask/middleware.py | 27 ++ backend-flask/migrations/README | 1 + backend-flask/migrations/alembic.ini | 50 ++++ backend-flask/migrations/env.py | 113 +++++++++ backend-flask/migrations/script.py.mako | 24 ++ ..._add_column_players_teams_availability_.py | 32 +++ .../migrations/versions/273f73c81783_.py | 33 +++ ...2f3ae2ec7f_make_player_role_primary_key.py | 26 ++ ...rename_table_players_teams_availability.py | 44 ++++ ..._make_playerteamavailability_a_db_model.py | 35 +++ ...8df14798d5_add_team_discord_webhook_url.py | 32 +++ .../a340b3da0f2a_add_auth_session_key.py | 32 +++ .../migrations/versions/b00632365b58_.py | 42 ++++ .../ce676db8c655_initial_migration.py | 61 +++++ backend-flask/models.py | 146 +++++++++++ backend-flask/pyrightconfig.json | 3 + backend-flask/requirements.txt | 15 ++ backend-flask/schedule.py | 237 ++++++++++++++++++ backend-flask/team.py | 53 ++++ backend-flask/utc.py | 15 ++ 38 files changed, 1506 insertions(+), 20 deletions(-) create mode 100644 availabili.tf/.env.development create mode 100644 availabili.tf/src/cacheable.ts create mode 100644 availabili.tf/src/stores/auth.ts create mode 100644 availabili.tf/src/stores/teams.ts create mode 100644 availabili.tf/src/views/LoginView.vue create mode 100644 backend-flask/.env create mode 100644 backend-flask/app.py create mode 100644 backend-flask/forms.py create mode 100644 backend-flask/login.py create mode 100644 backend-flask/middleware.py create mode 100644 backend-flask/migrations/README create mode 100644 backend-flask/migrations/alembic.ini create mode 100644 backend-flask/migrations/env.py create mode 100644 backend-flask/migrations/script.py.mako create mode 100644 backend-flask/migrations/versions/062a154a0797_add_column_players_teams_availability_.py create mode 100644 backend-flask/migrations/versions/273f73c81783_.py create mode 100644 backend-flask/migrations/versions/2b2f3ae2ec7f_make_player_role_primary_key.py create mode 100644 backend-flask/migrations/versions/4fb63c11ee8c_rename_table_players_teams_availability.py create mode 100644 backend-flask/migrations/versions/8ea29cf493f5_make_playerteamavailability_a_db_model.py create mode 100644 backend-flask/migrations/versions/958df14798d5_add_team_discord_webhook_url.py create mode 100644 backend-flask/migrations/versions/a340b3da0f2a_add_auth_session_key.py create mode 100644 backend-flask/migrations/versions/b00632365b58_.py create mode 100644 backend-flask/migrations/versions/ce676db8c655_initial_migration.py create mode 100644 backend-flask/models.py create mode 100644 backend-flask/pyrightconfig.json create mode 100644 backend-flask/requirements.txt create mode 100644 backend-flask/schedule.py create mode 100644 backend-flask/team.py create mode 100644 backend-flask/utc.py diff --git a/.gitignore b/.gitignore index 491897b..57b1bd3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__/ db.sqlite3 sqlite3/ +venv/ diff --git a/availabili.tf/.env.development b/availabili.tf/.env.development new file mode 100644 index 0000000..14ea4ad --- /dev/null +++ b/availabili.tf/.env.development @@ -0,0 +1 @@ +VITE_API_BASE_URL=/api diff --git a/availabili.tf/src/App.vue b/availabili.tf/src/App.vue index 98cfc88..e87e5c0 100644 --- a/availabili.tf/src/App.vue +++ b/availabili.tf/src/App.vue @@ -1,5 +1,7 @@