Skip to content

Commit c331781

Browse files
jettdctaza6535OwenHelfernh602
authored
Merge into main (#26)
* Update current-sprint (#22) * Update Main (#11) * Important changes (#3) * Add important things * Add to readme, add 2 services, add a module Co-authored-by: Jett Crowson <[email protected]> * Login route (#4) * add login route * remove deprecated test Co-authored-by: Jett Crowson <[email protected]> * Add database service, mock and impl * stash * Add announcement stuff * Add toast service error handling * Add toast service error handling * Fix test * Add getuserbyid path * Start Admin Page (#6) * User request table * Additional changes to table * Add approval and denial * Remove hardcoded height * Add text when all applicants are dealt with * Add tabs to admin table, fix tests * announcements * Add toast service. Begin blacklist users. * Fix test * Add blacklist table * Add in announcements posting. Unblacklist dbservice call. * Add in announcements posting. Unblacklist dbservice call. * Start mr changes Co-authored-by: Jett Crowson <[email protected]> * Login page (#7) * login and create account * changes to login and create account pages * login and create account changes * login and create account changes * login and create acc changes * login and create acc * Fix formatting * Aesthetic changes: * Confirm password matching * Add more validation * Tweaks * add star annotations * Add show invalid at end, validate login form Co-authored-by: Jett Crowson <[email protected]> * Rest Services + Nav Bar + Other Improvements (#8) * Add date interception, account service, announcement service * stash * fix provider * Add other services * Implement creating an account * Fix tests * add nav bar * nav tweaks * Revamp announcements page * fix tests * Change text * Add address service * Add availability service * Add blacklist service * Add phoneNumberService * Add profile photos service * Remove database service from announcements * Update eslintrc * Remove db service from blacklist table * Remove database service * Fix dateservice test * Make requested changes to create account form (#9) * Make requested changes to create account form * Add state list, phone number formatting to req Co-authored-by: Jett Crowson <[email protected]> * landing page (#10) * landing page Co-authored-by: Jett Crowson <[email protected]> Co-authored-by: taza6535 <[email protected]> * Production build changes * Update node version * Update budgets and buildspec Co-authored-by: Jett Crowson <[email protected]> Co-authored-by: taza6535 <[email protected]> * Remove redundant image service files * Email verification (#21) * Fix * Add integration for verifying emails from links * Fix tests * Fix account creation (#23) * Update announcements (#24) * Update announcements * Fix blacklist service Co-authored-by: Jett Crowson <[email protected]> * Search card (#25) * profile cards * Fix formatting * Add integration with backend. * delete redundant module * Remove test stage since we are not testing yet * Fix upper bound on distance filter * Add search bar functionality * Begin updating approval table * Approval and denial finishing touches Co-authored-by: taza6535 <[email protected]> * Pull in main * Remove test stage again * Fix small profile model and usage to match backend (#27) * Stable jwt frontend build with route guards and mock response (#13) * Stable jwt frontend build with route guards and mock response * Add dependencies to package * fix tests * Refactor login page auth * Update auth.service.ts * Fixing merge for jwt-frontend * pulled current sprint * fixing cookie issues Co-authored-by: Jett Crowson <[email protected]> * add some restrictions so only admins can see certain things, add profile nav link (#28) * Cleanup (#29) * Fix toast service, add spinner to respite search * Change icon and site name * Update README * Fix login bugs (#30) * Fix respite search on nav bar (#31) * Fix login bugs * hide respite search page * Moderator / Admin registration + approvals (#32) * Create staff registration page * Implement approval/denial table for staff * Route guard edit for checking that user's profile is completed (#33) * Implement profile completed check in user guard * Update readme * Add guard for not having completed profile yet * Profile integration (#34) * Fixed providing respite care information not appearing * Corrected change profile endpoint * Corrected frontend/backend variable name mismatch * Add account page: Update address, phone numbers, password, cw info, delete account (#35) * Implement account page and password update page * Add account deletion * Start to add fields for address and phone number on account page * Finish update address form and add update phone number form * Fix formatting on delete account page, update readme * Update address service * Update README * Update README * Update recent announcements error handling + readme * Update README.md * Add page for updating case worker information + methods to account service * Jwt frontend (#38) * Stable jwt frontend build with route guards and mock response * Add dependencies to package * fix tests * Refactor login page auth * Update auth.service.ts * Fixing merge for jwt-frontend * pulled current sprint * fixing cookie issues * first go at logout * first go at logout * refined logout * full login Co-authored-by: Jett Crowson <[email protected]> * Refactor with FormUtils (#39) * Add form utils * Update confirmPasswordValidator * Update updatePhone page to use form utils * Make update address form use form utils * Update README * Setup testing and test login modal (#40) * Test create account modal (#41) * Setup testing and test login modal * Create account modal tests * Remember me check box implementation * Do more testing (#43) * Setup testing and test login modal * Create account modal tests * Test account page * test change password component * test delete account component * Test address, cw, and phone update components * Test applicant components: staff and user * Test blacklist component * Add more tests * More testing (#44) * Begin testing image upload component * Test image upload component and finish profile page * Test landing and announcement * Test staff account create * Add email matching to verification component. * Refactor email regex * Navigate on wrong email format * Test nav bar, refactor auth service a bit, test a couple other things (#46) * add cared for medically fragile filter (#47) * Fix profiles creation and get images from s3 key. (#49) Co-authored-by: Jett Crowson <[email protected]> Co-authored-by: taza6535 <[email protected]> Co-authored-by: taza6535 <[email protected]> Co-authored-by: Owen Helfer <[email protected]> Co-authored-by: Nicholas Henley <[email protected]>
1 parent 64624e2 commit c331781

File tree

168 files changed

+6649
-741
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+6649
-741
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,8 @@ Thumbs.db
4646

4747
# AWS Credentials
4848
.env
49+
50+
chromedriver_linux64.zip
51+
google-chrome-stable_current_amd64.deb
52+
53+
coverage

.husky/pre-push

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm run test

README.md

+77-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,82 @@
11
# Foster Source Respite App
22

3+
## TODO
4+
5+
- [ ] Updating account
6+
- [ ] Backend endpoints
7+
- [x] Frontend forms
8+
- [x] Complete Profile
9+
- [x] Backend Routes
10+
- [x] Capture frontend user when they have not yet completed their account
11+
- user should not be able to visit any other page until they complete their account
12+
- [ ] Deployment
13+
- [ ] Make sure all configurations work in the cloud
14+
- [ ] Dockerize the backend?
15+
- [ ] Set up CI/CD
16+
- [ ] Set up AWS database
17+
- [ ] AWS
18+
- [ ] Re-add everyone to AWS
19+
- [ ] Get out of sandbox mode on emails
20+
- [ ] Images
21+
- [ ] Implement actual S3 image fetching on front end instead of placeholder images
22+
- [ ] Account Page
23+
- Different from profile page
24+
- [x] View account page
25+
- [x] Change case worker details front end
26+
- [x] Change case worker details back end
27+
- These two are on hold until we find out if users should be able to change this information.
28+
- [x] Delete account front end
29+
- [x] Delete account back end
30+
- [x] Change password front end
31+
- [ ] Change password back end
32+
- [x] Change address front end
33+
- [x] Change address back end
34+
- [x] Change phone number front end
35+
- [ ] Change phone number back end
36+
- [ ] Profile Page
37+
- [x] Finish profile page
38+
- [ ] Allow updating of attributes for profile
39+
- [ ] Login
40+
- [x] Work out bugs in login and sessions (ex. If you are insufficient privilege to go to a page it takes you back to the login page sometimes, whereas it should show you a 404)
41+
- [x] Logout
42+
- [ ] Forgot your password?
43+
- [x] Does unchecking the remember me tab do anything?
44+
- [x] Announcements
45+
- [x] Make recent announcements not return anything after maybe a week?
46+
- [x] Mod/Admin
47+
- [x] Mod / Admin signup page
48+
- [x] Mod / Admin approvals frontend
49+
- [x] Mod / Admin approvals backend
50+
- [x] Remove "Profile" tab on nav bar for mods and admins
51+
52+
### Known Bugs
53+
54+
- [ ] When user creates account, says they are logged in
55+
56+
### Stretch Goals
57+
58+
- [ ] Reporting functionality
59+
- [ ] User Forum
60+
- [ ] Feature requests + bug reporting
61+
62+
### Feature Backlog
63+
64+
- [ ] Allow user after account creation to choose to provide respite, rescind their current offering
65+
- [ ] Hide profile temporarily
66+
- [ ] Get list of all accounts for admins
67+
- [ ] Get list of all staff accounts for admins
68+
- [ ] Periodically go through and get rid of unverified accounts
69+
- [ ] Reject address if not coords
70+
71+
## Testing
72+
73+
Run the command `npm run test`.
74+
75+
If you are using Windows + WSL (Windows Subsystem for Linux):
76+
77+
- The angular testing system uses Google Chrome to run the tests. If you are on a virtual subsystem like WSL, it is likely that there is no chrome installed and so you will not be able to run tests.
78+
- Use [this link](https://www.gregbrisebois.com/posts/chromedriver-in-wsl2/) to setup to run tests. You may skip "The X Server" step
79+
380
## System Set-Up
481

582
This project is going to be built in angular, so to develop you will need to properly set up your environment.
@@ -73,5 +150,3 @@ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To u
73150
## Further help
74151

75152
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
76-
77-
> > > > > > > master

karma.conf.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = function (config) {
2020
// or set a specific seed with `seed: 4321`
2121
},
2222
clearContext: false, // leave Jasmine Spec Runner output visible in browser
23+
captureConsole: true,
2324
},
2425
jasmineHtmlReporter: {
2526
suppressAll: true, // removes the duplicated traces
@@ -42,7 +43,13 @@ module.exports = function (config) {
4243
colors: true,
4344
logLevel: config.LOG_INFO,
4445
autoWatch: true,
45-
browsers: ["Chrome"],
46+
browsers: ["ChromeHeadlessNoSandbox"],
47+
customLaunchers: {
48+
ChromeHeadlessNoSandbox: {
49+
base: "ChromeHeadless",
50+
flags: ["--no-sandbox"],
51+
},
52+
},
4653
singleRun: false,
4754
restartOnFileChange: true,
4855
});

package-lock.json

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "ng serve",
88
"build": "ng build",
99
"watch": "ng build --watch --configuration development",
10-
"test": "ng test --watch=false --browsers=ChromeHeadless",
10+
"test": "ng test --watch=false",
1111
"lint": "ng lint"
1212
},
1313
"private": true,
@@ -30,7 +30,10 @@
3030
"bootstrap": "^4.5.0",
3131
"google-libphonenumber": "^3.2.25",
3232
"jquery": "^3.6.0",
33+
"jwt-decode": "^3.1.2",
34+
"moment": "^2.29.1",
3335
"ngx-bootstrap-slider": "^1.9.0",
36+
"ngx-cookie-service": "^13.1.2",
3437
"ngx-editor": "^11.1.1",
3538
"ngx-image-cropper": "^5.0.1",
3639
"ngx-toastr": "^14.1.3",
@@ -51,6 +54,7 @@
5154
"@types/google-libphonenumber": "^7.4.21",
5255
"@types/jasmine": "~3.8.0",
5356
"@types/node": "^12.11.1",
57+
"@types/uuid": "^8.3.4",
5458
"@typescript-eslint/eslint-plugin": "^4.28.2",
5559
"@typescript-eslint/parser": "^4.28.2",
5660
"dotenv": "^10.0.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<div *ngIf="currentAccount" class="container mt-5">
2+
<div class="row">
3+
<div class="col">
4+
<h2>Your Account</h2>
5+
</div>
6+
</div>
7+
<div class="row mt-5">
8+
<div class="col-sm-12 col-md-6">
9+
<h3>Personal Information</h3>
10+
<p><b>Name:</b> {{ currentAccount.firstName }} {{ currentAccount.lastName }}</p>
11+
<p><b>Username:</b> {{ currentAccount.username }}</p>
12+
<p><b>Email:</b> {{ currentAccount.email }}</p>
13+
<p *ngIf="isUser">
14+
<b>Profile Completed:</b> {{ currentAccount.profileCompleted ? "Yes" : "No" }}
15+
<span *ngIf="!currentAccount.profileCompleted"
16+
><br /><a id="complete-profile-link" href="javascript:void(0)" [routerLink]="'/login/complete-profile'"
17+
>Click here to complete your profile</a
18+
><br
19+
/></span>
20+
<span *ngIf="!currentAccount.profileCompleted" class=""
21+
><small
22+
><i>You must complete your profile before you are able to use the respite search functionality.</i></small
23+
></span
24+
>
25+
</p>
26+
<p *ngIf="!isUser" id="account-level-p"><b>Account Level:</b> {{ currentAccount.privilege }}</p>
27+
</div>
28+
<div *ngIf="isUser" id="cw-info-div" class="col-sm-12 col-md-6 mt-sm-5 mt-md-0">
29+
<h3>Case Worker Information</h3>
30+
<p><b>Case Worker Name:</b> {{ currentAccount.cwFirstName }} {{ currentAccount.cwLastName }}</p>
31+
<p><b>Case Worker Email:</b> {{ currentAccount.cwEmail }}</p>
32+
<p><b>Case Worker Phone Number:</b> {{ currentAccount.cwPhoneNumber }}</p>
33+
<p><b>County or Agency Certified By:</b> {{ currentAccount.certifiedBy }}</p>
34+
<!-- TODO: Make sure that users should be able to update their case worker information -->
35+
<p>
36+
<a id="edit-cw-link" [routerLink]="'/account/update-case-worker-info'"
37+
>Click here to update your case worker information.</a
38+
>
39+
</p>
40+
</div>
41+
</div>
42+
<div class="row mt-5">
43+
<div class="col-sm-12 col-md-6">
44+
<h3>Address</h3>
45+
<p>
46+
{{ currentAccount.address.addressLine1 }}
47+
<span *ngIf="currentAccount.address.addressLine2">, {{ currentAccount.address.addressLine2 }}</span
48+
><br />{{ currentAccount.address.city }} {{ currentAccount.address.state }},
49+
{{ currentAccount.address.zipcode }}
50+
</p>
51+
<p><a id="update-address-link" [routerLink]="'/account/update-address'">Update your address</a></p>
52+
</div>
53+
<div class="col-sm-12 col-md-6 mt-sm-5 mt-md-0">
54+
<h3>Phone Number<span *ngIf="currentAccount.secondaryPhoneNumber">s</span></h3>
55+
<p>
56+
<b>Primary Phone Number:</b> {{ currentAccount.primaryPhoneNumber.phoneNumber }} ({{
57+
currentAccount.primaryPhoneNumber.type
58+
}})
59+
</p>
60+
<p *ngIf="currentAccount.secondaryPhoneNumber">
61+
<b>Secondary Phone Number:</b> {{ currentAccount.secondaryPhoneNumber.phoneNumber }} ({{
62+
currentAccount.secondaryPhoneNumber.type
63+
}})
64+
</p>
65+
<p>
66+
<a id="update-phone-link" [routerLink]="'/account/update-phone-number'"
67+
>Update your phone number<span *ngIf="currentAccount.secondaryPhoneNumber">s</span
68+
><span *ngIf="!currentAccount.secondaryPhoneNumber"> or add a secondary phone number.</span></a
69+
>
70+
</p>
71+
</div>
72+
</div>
73+
<div class="row mt-5">
74+
<div class="col-sm-12 col-md-6">
75+
<h3>Password</h3>
76+
<p><a href="javascript:void(0)" [routerLink]="'/account/update-password'">Update your password</a></p>
77+
</div>
78+
</div>
79+
<div class="row mt-5">
80+
<div class="col-sm-12 col-md-6">
81+
<h3>Delete Your Account</h3>
82+
<p><button class="btn btn-danger mt-2 delete-button" (click)="deleteAccount()">Delete Account</button></p>
83+
</div>
84+
</div>
85+
</div>

src/app/account/account-page/account-page.component.scss

Whitespace-only changes.

0 commit comments

Comments
 (0)