-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from csse-uoft/client-outcomes
client outcome occurrences Along with partner network push functionality Let the recipient of a referral update its status Add notification functionality Add functionality to send and receive appointments Make shareabilities and referral and appointment statuses be select fields instead of text fields
- Loading branch information
Showing
77 changed files
with
2,286 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Mail server | ||
MAIL_SENDER="[email protected]" | ||
MAIL_SERVER="mail.example.com" | ||
MAIL_PORT="465" | ||
MAIL_USERNAME="[email protected]" | ||
MAIL_PASSWORD="password" | ||
|
||
# Custom GraphDB | ||
GRAPHDB_ADDRESS="http://127.0.0.1:7200" | ||
GRAPHDB_USERNAME="username" | ||
GRAPHDB_PASSWORD="password" | ||
|
||
# Custom MongoDB connection string | ||
MONGODB_ADDRESS="mongodb://127.0.0.1:27017/snmi" | ||
|
||
# Only in the testing env, make it accept self signed certificate | ||
# For partner network testing | ||
NODE_TLS_REJECT_UNAUTHORIZED=0 | ||
|
||
# Change it if you have the frontend somewhere else (CORS + Email Link) | ||
FRONTEND_ADDRESS="http://127.0.0.1:3000" | ||
|
||
# Backend Port | ||
PORT=5001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
function formatLocation(location, addressInfo) { | ||
if (Object.keys(location).length === 1) { | ||
return "Not Provided"; | ||
} | ||
|
||
let format_location = ''; | ||
if (location.unitNumber) { | ||
format_location += `${location.unitNumber}-`; | ||
} | ||
if (location.streetNumber) { | ||
format_location += `${location.streetNumber} `; | ||
} | ||
if (location.streetName) { | ||
format_location += `${location.streetName}`; | ||
} | ||
if (location.streetType && addressInfo?.streetTypes) { | ||
format_location += ` ${addressInfo.streetTypes[location.streetType]}`; | ||
} | ||
if (location.streetDirection && addressInfo?.streetDirections) { | ||
format_location += ` ${addressInfo.streetDirections[location.streetDirection]}`; | ||
} | ||
if (location.city) { | ||
format_location += `, ${location.city}`; | ||
} | ||
if (location.state && addressInfo?.states) { | ||
format_location += `, ${addressInfo.states[location.state]}`; | ||
} | ||
if (location.postalCode) { | ||
format_location += ` ${location.postalCode}`; | ||
} | ||
|
||
if (format_location === '') { | ||
if (location.lat && location.lng) { | ||
format_location += `(${location.lat}, ${location.lng})`; | ||
} | ||
} | ||
return format_location; | ||
} | ||
|
||
module.exports = {formatLocation} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* @param text: the string to sanitize | ||
* @returns {string} | ||
*/ | ||
const sanitize = text => { | ||
return text.replace(/[^\w\., ()/-]/, '').trim(); | ||
} | ||
|
||
module.exports = { sanitize } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const {createGraphDBModel} = require("graphdb-utils"); | ||
|
||
const GDBNotificationModel = createGraphDBModel({ | ||
name: {type: String, internalKey: ':hasName'}, | ||
description: {type: String, internalKey: 'cids:hasDescription'}, | ||
datetime: {type: Date, internalKey: ':hasDatetime'}, | ||
isRead: {type: Boolean, internalKey: ':isRead'} | ||
}, { | ||
rdfTypes: [':Notification'], name: 'notification' | ||
}); | ||
|
||
module.exports = { | ||
GDBNotificationModel | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.