Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashboard,api: update UI with profile picture changes #76

Merged
merged 41 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a4c40a7
chore: make master in line with develop (#69)
kolharsam Nov 3, 2023
9e8b99d
Merge branch 'develop'
kolharsam Nov 3, 2023
d2cb39e
update coverage branch on README
kolharsam Nov 3, 2023
0e4296c
check authentication state for register and login endpoints
kolharsam Nov 4, 2023
11a2861
update requirements with boto
kolharsam Nov 4, 2023
a5c9be4
update travis script with the new secrets
kolharsam Nov 6, 2023
2913868
add zipcode to location model and remove profile_picture columns
kolharsam Nov 6, 2023
70d4409
add new utils read_request_body and make_s3_path
kolharsam Nov 6, 2023
fcb2c94
update auth_backends to ensure that types of properties are ignored
kolharsam Nov 6, 2023
c79d8c6
update vscode settings
kolharsam Nov 6, 2023
327dc7c
update settings files to prepare for s3 work
kolharsam Nov 6, 2023
340cdfd
update migrations with altered pets, users and locations models
kolharsam Nov 6, 2023
2ad1c81
update github actions file with new steps to also run format and lint…
kolharsam Nov 6, 2023
aa8ba49
update with views to handle image uploads for user and pet pictures
kolharsam Nov 6, 2023
5ba1d0c
update urls to ensure new picture based views are accessible
kolharsam Nov 6, 2023
6458cf6
update sessions API response
kolharsam Nov 6, 2023
0152d08
update status code for no profile picture found
kolharsam Nov 6, 2023
9e4c28d
update status code for pet picture to 404 when no picture present
kolharsam Nov 6, 2023
f9d8219
fix util function read_request_body
kolharsam Nov 6, 2023
7e74f7a
update views to provide the correct response
kolharsam Nov 6, 2023
d4099c6
update UI to fetch profile picture
kolharsam Nov 6, 2023
b49bf75
update UI on profiles to ensure that users don't change dob to <16
kolharsam Nov 6, 2023
5b1e9ff
ensure all views are used with decorator csrf_protect
kolharsam Nov 6, 2023
4684216
make sure user age is null or >=16 on db
kolharsam Nov 6, 2023
8a24d8a
apply black formatter changes
kolharsam Nov 6, 2023
46db05c
remove todos
kolharsam Nov 6, 2023
a28d4ab
remove check constraint changes
kolharsam Nov 6, 2023
653e52c
add check constraint at db level to ensure age >= 16
kolharsam Nov 6, 2023
35f9465
update job with exit zero
kolharsam Nov 6, 2023
307cd5c
remove zipcode migration
kolharsam Nov 6, 2023
158a97b
update settings with ebdb as only db
kolharsam Nov 6, 2023
a7a0119
update settings constants
kolharsam Nov 6, 2023
dddb3ad
[temp] update to ensure prod deployment goes through
kolharsam Nov 6, 2023
95b9a68
simple bug fixes
kolharsam Nov 10, 2023
e1452ae
add locations UI
kolharsam Nov 27, 2023
ec08fb3
fix python lint issues
kolharsam Nov 27, 2023
040f55e
Merge branch 'develop' into sam/make-api-profile-pic
kolharsam Nov 27, 2023
429289c
merged migrations format fix
kolharsam Nov 27, 2023
e08740f
update db name in furbaby app settings
kolharsam Nov 27, 2023
656ac66
update comment around env. db names
kolharsam Nov 27, 2023
87accf0
remove migrations from travis since github job handles them
kolharsam Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/django-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,20 @@ jobs:
python -m pip install --upgrade pip
cd furbaby
pip install -r requirements.txt
- name: Check Format
run: |
black .
- name: Check Link
run: |
pylint **/*.py --exit-zero
- name: Run Tests
run: |
cd furbaby
export AWS_RDS_DATABASE_PASSWORD="dummy-password"
export DJANGO_SECRET_KEY="dummy-secret-key"
export EMAIL_APP_PASSWORD="dummy-user-email-password"
export EMAIL_APP_USERNAME="dummy-user-email"
export AWS_ACCESS_KEY_ID="dummy-user-key-id"
export AWS_SECRET_ACCESS_KEY="dummy-secret-access-key"
export AWS_BUCKET_NAME="dummy-aws-bucket-name"
python manage.py test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
**/.coveralls.yml

**/*.coverage

**/fakeData.json
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ jobs:
- export GIT_COMMIT_HASH=$(git rev-parse HEAD)
- echo $GIT_COMMIT_HASH
- echo $GIT_COMMIT_SHORT_HASH

before_script:
- python manage.py makemigrations --settings=furbaby.settings
- python manage.py migrate --settings=furbaby.settings
- export AWS_SECRET_ACCESS_KEY="$AWS_ACCESS_SECRET_KEY"
- export AWS_BUCKET_NAME="elasticbeanstalk-us-east-1-994011800090"

script:
- printenv > ./furbaby/.env
Expand All @@ -38,7 +36,7 @@ jobs:
region: "us-east-1"
app: "project-team-1-furbaby"
env: "staging"
bucket: "elasticbeanstalk-us-east-1-994011800090"
bucket: $AWS_BUCKET_NAME
on:
branch: develop

Expand All @@ -48,7 +46,7 @@ jobs:
region: "us-east-1"
app: "project-team-1-furbaby"
env: "production"
bucket: "elasticbeanstalk-us-east-1-994011800090"
bucket: $AWS_BUCKET_NAME
skip_cleanup: true
on:
branch: master
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
}
},
"typescript.tsdk": "frontend/node_modules/typescript/lib",
"editor.tabSize": 2
"editor.tabSize": 2,
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": true
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#### Master Branch

[![Coverage Status | Master](https://coveralls.io/repos/github/gcivil-nyu-org/INET-Monday-Fall2023-Team-1/badge.svg?branch=master)](https://coveralls.io/github/gcivil-nyu-org/INET-Monday-Fall2023-Team-1?branch=master)
[![Coverage Status | Master](https://coveralls.io/repos/github/gcivil-nyu-org/INET-Monday-Fall2023-Team-1/badge.svg?branch=master)](https://coveralls.io/github/gcivil-nyu-org/INET-Monday-Fall2023-Team-1?branch=HEAD)

[![Build Status | Master](https://app.travis-ci.com/gcivil-nyu-org/INET-Monday-Fall2023-Team-1.svg?branch=master)](https://app.travis-ci.com/gcivil-nyu-org/INET-Monday-Fall2023-Team-1)

Expand Down
143 changes: 143 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@tailwindcss/forms": "0.5.6",
"@tailwindcss/typography": "0.5.10",
"@types/lodash": "4.14.200",
"@types/react-helmet": "6.1.7",
"@typescript-eslint/eslint-plugin": "5.10.2",
"@typescript-eslint/parser": "5.10.2",
"daisyui": "3.9.4",
"eslint": "8.8.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.25.4",
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en" class="h-full bg-white">
<html lang="en" data-theme="emerald" class="h-full bg-white">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
Expand Down
12 changes: 11 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const AppRouter = () => {
const { pathname } = useLocation();

useEffect(() => {
if (authenticationState.isSessionSet) {
if (authenticationState.isSessionSet && ROUTES.FORGOT_PASSWORD !== pathname) {
if (Object.values(ROUTES.PROTECTED_ROUTES).find((route) => route === pathname)) {
navigate(pathname, { replace: true });
} else {
Expand Down Expand Up @@ -85,6 +85,16 @@ const AppRouter = () => {
</ProtectedRoute>
}
/>
<Route
path="locations"
element={
<ProtectedRoute>
<Home
authContext={{ onLogin, onRegister, passwordReset, authenticationState, ...rest }}
/>
</ProtectedRoute>
}
/>
<Route path="*" element={<NotFound />} />
</Routes>
);
Expand Down
Loading