Skip to content

Commit 3b3ba61

Browse files
committed
accessing the admin name instead of the id
1 parent 3fe9518 commit 3b3ba61

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/backend/lib/db_helpers/case_manager.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface paraInputProps {
1717
export async function createPara(
1818
para: paraInputProps,
1919
db: KyselyDatabaseInstance,
20-
case_manager_id: string,
20+
case_manager_first_name: string,
2121
from_email: string,
2222
to_email: string,
2323
env: Env
@@ -47,7 +47,7 @@ export async function createPara(
4747
from_email,
4848
to_email,
4949
first_name,
50-
case_manager_id,
50+
case_manager_first_name,
5151
env
5252
);
5353
}
@@ -62,21 +62,21 @@ export async function sendInviteEmail(
6262
fromEmail: string,
6363
toEmail: string,
6464
first_name: string,
65-
caseManagerName: string,
65+
case_manager_first_name: string,
6666
env: Env
6767
): Promise<void> {
6868
await getTransporter(env).sendMail({
6969
from: fromEmail,
7070
to: toEmail,
71-
subject: `Welcome to ${caseManagerName}'s classroom`,
71+
subject: `Welcome to ${case_manager_first_name}'s classroom`,
7272
text: `${first_name}, get set up for data collection with Compass`,
7373
html: `Hi ${first_name}! <br/>
74-
${caseManagerName} has added you as a staff member for their classroom in Compass. <br/>
74+
${case_manager_first_name} has added you as a staff member for their classroom in Compass. <br/>
7575
Compass is an all in one tool for collecting data for students’ IEP goals and empowering your classroom team to better assist students. <br/> <br/>
7676
How does Compass work? <br/>
7777
Compass will help you organize data collection for the students you work with and securely store the data you collect. <br/>
78-
${caseManagerName} will add you to data collection tasks for specific student goals. Upon logging in, you’ll see which students you’re expected to collect data for.
79-
Instructions from ${caseManagerName} will be available with each assignment. When you’re ready to begin, you’ll be able to collect and submit data and notes directly in the app. <br/><br/>
78+
${case_manager_first_name} will add you to data collection tasks for specific student goals. Upon logging in, you’ll see which students you’re expected to collect data for.
79+
Instructions from ${case_manager_first_name} will be available with each assignment. When you’re ready to begin, you’ll be able to collect and submit data and notes directly in the app. <br/><br/>
8080
Getting started <br/>
8181
To get set up with Compass, use the link below and log in with the email address you received this message at. <br/>
8282
Thank you for the key role you play in improving student outcomes!`,

src/backend/routers/case_manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export const case_manager = router({
164164
const para = await createPara(
165165
req.input,
166166
req.ctx.db,
167-
req.ctx.auth.userId,
167+
req.ctx.auth.session.user?.name ?? "",
168168
req.ctx.env.EMAIL,
169169
req.input.email,
170170
req.ctx.env

src/backend/routers/para.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export const para = router({
5353
email,
5454
req.ctx.env
5555
);
56-
5756
return para;
5857

5958
// TODO: Logic for sending email to staff. Should email be sent everytime or only first time? Should staff be notified that they are added to a certain case manager's list?

0 commit comments

Comments
 (0)