From 08d12a948c2374c025e3e35c55578e60583a7919 Mon Sep 17 00:00:00 2001 From: Hadi Ahmed Date: Sat, 29 Apr 2023 22:23:21 +0000 Subject: [PATCH 01/10] Removed several references to IEEE --- api/.env.git | 1 + api/package.json | 4 ++-- api/src/controllers/oidc.js | 2 +- api/src/routes/account.js | 4 ++-- api/src/routes/login.js | 4 ++-- api/src/routes/purchase.js | 10 +++++----- api/src/utils/mailer.js | 2 +- ui/package.json | 3 ++- ui/src/App.vue | 15 +++++++-------- ui/src/environment/.env.dev | 1 + ui/src/environment/.env.prod | 1 + ui/src/views/ForgotUserPass.vue | 2 +- ui/src/views/LoginSignup.vue | 7 ++++--- ui/src/views/budget/BudgetHome.vue | 2 +- ui/src/views/dues/DuesEdit.vue | 2 +- ui/src/views/dues/DuesFrame.vue | 2 +- ui/src/views/dues/DuesHome.vue | 4 ++-- ui/src/views/financials/FinancialsFrame.vue | 2 +- ui/src/views/infra/InfraHome.vue | 2 +- ui/src/views/oidc/OIDCRegister.vue | 4 ++-- ui/src/views/purchase/PurchaseApprove.vue | 2 +- ui/src/views/purchase/PurchaseNew.vue | 6 +++--- ui/src/views/purchase/PurchaseReimbursements.vue | 2 +- ui/src/views/purchase/PurchaseView.vue | 2 +- 24 files changed, 45 insertions(+), 41 deletions(-) diff --git a/api/.env.git b/api/.env.git index abe2ced8..7f761a30 100644 --- a/api/.env.git +++ b/api/.env.git @@ -20,6 +20,7 @@ SEND_MAIL=yes # Details for the SMTP server designated for emails SMTP_HOST=localhost SMTP_PORT=25 +SMTP_FROM=boilerbooks@example.com # The URL pointing to this server HTTP_HOST=localhost diff --git a/api/package.json b/api/package.json index 29220e96..9a815be8 100644 --- a/api/package.json +++ b/api/package.json @@ -1,7 +1,7 @@ { "name": "boilerbooks-api", - "version": "2.0.0", - "description": "Backend API for the Purdue IEEE boilerbooks accounting software", + "version": "2.2", + "description": "Backend API for the Boiler Books accounting software", "main": "src/server.js", "private": true, "type": "module", diff --git a/api/src/controllers/oidc.js b/api/src/controllers/oidc.js index de4e1647..1bfebe37 100644 --- a/api/src/controllers/oidc.js +++ b/api/src/controllers/oidc.js @@ -231,7 +231,7 @@ async function post_oidc_register(req, res, next) { // Username already exists (should not ever get hit) if (err.code === "ER_DUP_ENTRY") { logger.error("DUPLICATE USERNAME/EMAIL:" + req.body.uname); - res.status(400).send("Unexpected Error: Please contact Purdue IEEE!"); + res.status(400).send("Unexpected Error: Please contact the system administrator!"); return next(); } else { logger.error(err.stack); diff --git a/api/src/routes/account.js b/api/src/routes/account.js index 86249fbb..7d2223f2 100644 --- a/api/src/routes/account.js +++ b/api/src/routes/account.js @@ -159,11 +159,11 @@ router.post("/:userID", (req, res, next) => { subject: "Boiler Books Password Changed", text: "Your Boiler Books password was recently changed.\n" + "If you made this request, you can safely ignore this message.\n" + - "Otherwise, please reach out to IEEE.\n\n" + + "Otherwise, please reach out to the system administrator.\n\n" + "This email was automatically sent by Boiler Books", html: `

Your Boiler Books password was recently changed.

If you made this request, you can safely ignore this message.

-

Otherwise, please reach out to IEEE.

+

Otherwise, please reach out to the system administrator.


This email was automatically sent by Boiler Books`, }); diff --git a/api/src/routes/login.js b/api/src/routes/login.js index f6b42bd5..ad4ee2a7 100644 --- a/api/src/routes/login.js +++ b/api/src/routes/login.js @@ -375,11 +375,11 @@ router.post("/reset", async(req, res, next) => { subject: "Boiler Books Password Reset", text: "Your Boiler Books password was reset.\n" + "If you made this change, you can safely ignore this message.\n" + - "Otherwise, please reach out to IEEE.\n\n" + + "Otherwise, please reach out to the system administrator.\n\n" + "This email was automatically sent by Boiler Books", html: `

Your Boiler Books password was resent.

If you made this change, you can safely ignore this message.

-

Otherwise, please reach out to IEEE.

+

Otherwise, please reach out to the system administrator.


This email was automatically sent by Boiler Books`, }); diff --git a/api/src/routes/purchase.js b/api/src/routes/purchase.js index 1f0fd369..5ea4d6eb 100644 --- a/api/src/routes/purchase.js +++ b/api/src/routes/purchase.js @@ -194,12 +194,12 @@ router.post("/", async(req, res, next) => { subject: `New Purchase Request for ${committee_id_to_display[req.body.committee]}`, text: `A request was made by ${cleanUTF8(req.body.user)} for ${cleanUTF8(req.body.item)} costing $${req.body.price}\n` + "Please visit Boiler Books at your earliest convenience to approve or deny the request.\n" + - `You always view the most up-to-date status of the purchase at https://money.purdueieee.org/ui/detail-view?id=${insert_id}.\n\n` + + `You always view the most up-to-date status of the purchase at https://${process.env.HTTP_HOST}/ui/detail-view?id=${insert_id}.\n\n` + "This email was automatically sent by Boiler Books", html: `

New Purchase Request!

A request was made by ${req.body.user} for ${req.body.item} costing $${req.body.price}.

-

Please visit Boiler Books at your earliest convenience to approve or deny the request.

-

You always view the most up-to-date status of the purchase here.

+

Please visit Boiler Books at your earliest convenience to approve or deny the request.

+

You always view the most up-to-date status of the purchase here.


This email was automatically sent by Boiler Books`, }); @@ -632,7 +632,7 @@ router.post("/:purchaseID/approve", async(req, res, next) => { "This email was automatically sent by Boiler Books", html: `

Your Purchase Request Was ${purchase_deets[0].status}

Your request to buy ${purchase_deets[0].item} for ${committee_id_to_display_readonly_included[purchase_deets[0].committee]} was ${purchase_deets[0].status}

-

Please visit Boiler Books at your earliest convenience to complete the request.

+

Please visit Boiler Books at your earliest convenience to complete the request.

You always view the most up-to-date status of the purchase here.


This email was automatically sent by Boiler Books`, @@ -809,7 +809,7 @@ router.post("/:purchaseID/complete", fileHandler.single("receipt"), async(req, r `You always view the most up-to-date status of the purchase at https://${process.env.HTTP_HOST}/ui/detail-view?id=${req.params.purchaseID}.\n\n` + "This email was automatically sent by Boiler Books", html: `

${committee_id_to_display[purchase_deets[0].committee]} has purchased ${purchase_deets[0].item} for $${purchase_deets[0].cost}

-

Please visit Boiler Books at your earliest convenience to begin the reimbursement process.

+

Please visit Boiler Books at your earliest convenience to begin the reimbursement process.

You always view the most up-to-date status of the purchase here.


This email was automatically sent by Boiler Books`, diff --git a/api/src/utils/mailer.js b/api/src/utils/mailer.js index 8705b0dd..556547d3 100644 --- a/api/src/utils/mailer.js +++ b/api/src/utils/mailer.js @@ -24,7 +24,7 @@ const mailer = nodemailer.createTransport({ secure: false, ignoreTLS: true, },{ - from: "Boiler Books ", + from: `Boiler Books <${process.env.SMTP_FROM}>`, }); const MAX_TRIES = 5; diff --git a/ui/package.json b/ui/package.json index b2ee1135..72eaef33 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,7 @@ { "name": "boilerbooks-ui", - "version": "2.0.0", + "version": "2.2", + "description": "Frontend UI for the Boiler Books accounting software", "private": true, "scripts": { "vstring": "echo VITE_VERSION_STRING=$(git describe --tags --abbrev=0)-$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD) > src/environment/.env.local", diff --git a/ui/src/App.vue b/ui/src/App.vue index 4c9780e4..551f95f7 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -3,18 +3,18 @@ -
-

View page on GitHub

-

{{version_string}}

-

Copyright © Purdue IEEE
with Hadi Ahmed and Kyle Rakos

+

Boiler Books {{version_string}}

+

View project on GitHub

+

Copyright © Purdue IEEE
with Hadi Ahmed and Kyle Rakos

diff --git a/ui/src/environment/.env.dev b/ui/src/environment/.env.dev index 9162047b..cbd8ec8e 100644 --- a/ui/src/environment/.env.dev +++ b/ui/src/environment/.env.dev @@ -1,2 +1,3 @@ VITE_USE_OIDC=false VITE_OIDC_ACCOUNT=https://sso.purdueieee.org/realms/Purdue-IEEE/account/#/ +VITE_OIDC_NAME=Generic SSO diff --git a/ui/src/environment/.env.prod b/ui/src/environment/.env.prod index c8517c2b..509fa186 100644 --- a/ui/src/environment/.env.prod +++ b/ui/src/environment/.env.prod @@ -1,2 +1,3 @@ VITE_USE_OIDC=true VITE_OIDC_ACCOUNT=https://sso.purdueieee.org/realms/Purdue-IEEE/account/#/ +VITE_OIDC_NAME=Purdue IEEE SSO diff --git a/ui/src/views/ForgotUserPass.vue b/ui/src/views/ForgotUserPass.vue index 0c4175ec..1c571f87 100644 --- a/ui/src/views/ForgotUserPass.vue +++ b/ui/src/views/ForgotUserPass.vue @@ -2,7 +2,7 @@

Forgot Username

-

Enter the email associated with the account below.
If you don't remember the email you used, please contact IEEE at ieee@purdue.edu for more help.

+

Enter the email associated with the account below.
If you don't remember the email you used, please contact the system administrator for more help.

{{dispmsg}}

diff --git a/ui/src/views/LoginSignup.vue b/ui/src/views/LoginSignup.vue index bd668c10..07f97884 100644 --- a/ui/src/views/LoginSignup.vue +++ b/ui/src/views/LoginSignup.vue @@ -75,8 +75,8 @@
- - + +

Caps Lock is on!

@@ -92,7 +92,7 @@ @@ -141,6 +141,7 @@ export default { errmsg: '', showCapsWarning: false, useOIDC: import.meta.env.VITE_USE_OIDC === "true", + OIDC_provider: import.meta.env.VITE_OIDC_NAME, } }, created() { diff --git a/ui/src/views/budget/BudgetHome.vue b/ui/src/views/budget/BudgetHome.vue index f0db9ee4..364561bd 100644 --- a/ui/src/views/budget/BudgetHome.vue +++ b/ui/src/views/budget/BudgetHome.vue @@ -5,7 +5,7 @@ Add a new budget request each fiscal year. Once submitted, the treasurer will approve or deny the budget.

- Per the IEEE constitution, budgets must be submitted within the first week of the academic year. + Contact the treasurer with any questions about budget details and deadlines.

diff --git a/ui/src/views/dues/DuesEdit.vue b/ui/src/views/dues/DuesEdit.vue index 9f0974bb..39b45e5f 100644 --- a/ui/src/views/dues/DuesEdit.vue +++ b/ui/src/views/dues/DuesEdit.vue @@ -95,7 +95,7 @@

-
NOTE: 'Exempt' members are those who have an existing International IEEE membership.
+
NOTE: 'Exempt' members are those who do not need to pay dues.
diff --git a/ui/src/views/dues/DuesFrame.vue b/ui/src/views/dues/DuesFrame.vue index 6ccddcd9..252b4ba4 100644 --- a/ui/src/views/dues/DuesFrame.vue +++ b/ui/src/views/dues/DuesFrame.vue @@ -1,6 +1,6 @@ diff --git a/ui/src/views/financials/FinancialsFrame.vue b/ui/src/views/financials/FinancialsFrame.vue index 0c08066f..fe04f9fd 100644 --- a/ui/src/views/financials/FinancialsFrame.vue +++ b/ui/src/views/financials/FinancialsFrame.vue @@ -1,6 +1,6 @@ diff --git a/ui/src/views/oidc/OIDCRegister.vue b/ui/src/views/oidc/OIDCRegister.vue index 6c9c3595..02d91cc8 100644 --- a/ui/src/views/oidc/OIDCRegister.vue +++ b/ui/src/views/oidc/OIDCRegister.vue @@ -38,8 +38,8 @@
- - + +

Caps Lock is on!

diff --git a/ui/src/views/purchase/PurchaseApprove.vue b/ui/src/views/purchase/PurchaseApprove.vue index 26ba3a68..144b14ee 100644 --- a/ui/src/views/purchase/PurchaseApprove.vue +++ b/ui/src/views/purchase/PurchaseApprove.vue @@ -10,7 +10,7 @@

-
Warning! Purchase cost exceeds committee balance. Please talk to the IEEE Treasurer before approving this purchase
+
Warning! Purchase cost exceeds committee balance. Please talk to the Treasurer before approving this purchase
Warning! Committe balance is low!
diff --git a/ui/src/views/purchase/PurchaseNew.vue b/ui/src/views/purchase/PurchaseNew.vue index e1cc08bc..a8fbf15f 100644 --- a/ui/src/views/purchase/PurchaseNew.vue +++ b/ui/src/views/purchase/PurchaseNew.vue @@ -14,8 +14,8 @@
diff --git a/ui/src/views/purchase/PurchaseReimbursements.vue b/ui/src/views/purchase/PurchaseReimbursements.vue index ef10fdef..1cce969f 100644 --- a/ui/src/views/purchase/PurchaseReimbursements.vue +++ b/ui/src/views/purchase/PurchaseReimbursements.vue @@ -1,7 +1,7 @@