placementt-core 1.400.1196 → 1.400.1197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/constants.js CHANGED
@@ -1162,13 +1162,77 @@ exports.defaultApplicantWorkflow = [
1162
1162
  },
1163
1163
  },
1164
1164
  ];
1165
+ // Params every placement email can use.
1166
+ const placementEmailParams = ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"];
1167
+ // Placement emails that list what the recipient still has to do.
1168
+ const placementActionParams = [...placementEmailParams, "outstandingActions"];
1169
+ // Placement emails sent while the placement waits on someone else.
1170
+ const placementWaitingParams = [...placementEmailParams, "waitingOn"];
1171
+ const placementRejectedParams = [...placementEmailParams, "reason"];
1172
+ // Emails to the cohort contact about the cohort as a whole.
1173
+ const staffCohortEmailParams = ["cohortName", "submissionDeadline", "daysUntilDeadline", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"];
1174
+ // Cohort emails sent before a student has a placement.
1175
+ const cohortEmailParams = ["studentForename", "studentSurname", "studentEmail", "parentEmail", "submissionDeadline", "daysUntilDeadline", "cohortName", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"];
1165
1176
  exports.emailTemplates = {
1177
+ studentSubmissionReminder: {
1178
+ product: "wex",
1179
+ description: "Sent to students with no placement, counting down to the submission deadline (150, 120, 84, 63, 49, 35, 28, 21 and 14 days before). Not sent for continuous cohorts.",
1180
+ params: cohortEmailParams,
1181
+ button: { text: "Submit placement", link: "/institutes/home" },
1182
+ type: "workflow",
1183
+ name: "Please submit your placement",
1184
+ recipient: "student",
1185
+ group: "Before submission",
1186
+ },
1187
+ parentSubmissionReminder: {
1188
+ product: "wex",
1189
+ description: "Sent to the parent of a student with no placement, on the same days as the student reminder.",
1190
+ params: cohortEmailParams,
1191
+ type: "workflow",
1192
+ name: "Please help submit",
1193
+ recipient: "parent",
1194
+ group: "Before submission",
1195
+ },
1196
+ staffSubmissionWindowClosing: {
1197
+ product: "wex",
1198
+ description: "Sent to the cohort contact a week before and on the day the submission window closes. Hard deadline cohorts only.",
1199
+ params: staffCohortEmailParams,
1200
+ button: { text: "Edit submission dates", link: "/institutes/cohorts/{{cohortId}}/settings" },
1201
+ type: "workflow",
1202
+ name: "Submissions closing soon",
1203
+ recipient: "staff",
1204
+ group: "Before submission",
1205
+ },
1166
1206
  studentPlacementCreated: {
1167
1207
  product: "wex",
1168
1208
  description: "Sent to the student once a placement has been created.",
1169
1209
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1170
1210
  button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1171
- type: "workflow"
1211
+ type: "workflow",
1212
+ name: "Placement submitted",
1213
+ recipient: "student",
1214
+ group: "Submission",
1215
+ },
1216
+ staffLatePlacementSubmitted: {
1217
+ product: "wex",
1218
+ description: "Sent to the cohort contact when a placement is submitted after the submission deadline.",
1219
+ params: placementEmailParams,
1220
+ button: { text: "View placement", link: "/institutes/cohorts/placements/{{pId}}" },
1221
+ type: "workflow",
1222
+ name: "Late submission",
1223
+ recipient: "staff",
1224
+ group: "Submission",
1225
+ },
1226
+ providerActionRequired: {
1227
+ product: "wex",
1228
+ description: "Sent to the provider when they need to review the placement.",
1229
+ params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "outstandingActions", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "providerContactForename", "providerContactSurname", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1230
+ button: { text: "Review placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1231
+ type: "workflow",
1232
+ name: "Please review this placement",
1233
+ recipient: "provider",
1234
+ group: "Action required",
1235
+ locked: true,
1172
1236
  },
1173
1237
  parentActionRequired: {
1174
1238
  product: "wex",
@@ -1176,15 +1240,111 @@ exports.emailTemplates = {
1176
1240
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "outstandingActions", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1177
1241
  button: { text: "Review placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1178
1242
  type: "workflow",
1179
- group: "Action required"
1243
+ name: "Please review this placement",
1244
+ recipient: "parent",
1245
+ group: "Action required",
1246
+ locked: true,
1180
1247
  },
1181
- providerActionRequired: {
1248
+ studentActionRequired: {
1182
1249
  product: "wex",
1183
- description: "Sent to the provider when they need to review the placement.",
1184
- params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "outstandingActions", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "providerContactForename", "providerContactSurname", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1250
+ description: "Sent to the student when a stage needs something from them, such as changes, a form or a file.",
1251
+ params: placementActionParams,
1252
+ button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1253
+ type: "workflow",
1254
+ name: "Action required",
1255
+ recipient: "student",
1256
+ group: "Action required",
1257
+ locked: true,
1258
+ },
1259
+ providerSignOffReminder: {
1260
+ product: "wex",
1261
+ description: "Chases the employer 7 and 14 days after the placement reaches them, then weekly, and 7 days after they open the link without finishing.",
1262
+ params: placementActionParams,
1185
1263
  button: { text: "Review placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1186
1264
  type: "workflow",
1187
- group: "Action required"
1265
+ name: "Reminder: please sign off",
1266
+ recipient: "provider",
1267
+ group: "Sign-off reminders",
1268
+ },
1269
+ parentSignOffReminder: {
1270
+ product: "wex",
1271
+ description: "Chases the parent 7 and 14 days after the placement reaches them, then weekly, and 7 days after they open the link without finishing.",
1272
+ params: placementActionParams,
1273
+ button: { text: "Review placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1274
+ type: "workflow",
1275
+ name: "Reminder: please sign off",
1276
+ recipient: "parent",
1277
+ group: "Sign-off reminders",
1278
+ },
1279
+ studentSignOffReminder: {
1280
+ product: "wex",
1281
+ description: "Chases the student 7 and 14 days after the placement reaches them, then weekly, and 7 days after they open it without finishing.",
1282
+ params: placementActionParams,
1283
+ button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1284
+ type: "workflow",
1285
+ name: "Reminder: please complete this stage",
1286
+ recipient: "student",
1287
+ group: "Sign-off reminders",
1288
+ },
1289
+ studentStillWaiting: {
1290
+ product: "wex",
1291
+ description: "While the placement waits on someone else, tells the student who it is waiting on and asks them to follow up. Same days as the sign-off reminders.",
1292
+ params: placementWaitingParams,
1293
+ button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1294
+ type: "workflow",
1295
+ name: "Still waiting on someone",
1296
+ recipient: "student",
1297
+ group: "Sign-off reminders",
1298
+ },
1299
+ parentStillWaiting: {
1300
+ product: "wex",
1301
+ description: "While the placement waits on someone else, tells the parent who it is waiting on and asks them to follow up. Same days as the sign-off reminders.",
1302
+ params: placementWaitingParams,
1303
+ button: { text: "View placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1304
+ type: "workflow",
1305
+ name: "Still waiting on someone",
1306
+ recipient: "parent",
1307
+ group: "Sign-off reminders",
1308
+ },
1309
+ studentPlacementStatusChange: {
1310
+ product: "wex",
1311
+ description: "Sent to the student when their placement moves to a new stage.",
1312
+ params: ["studentForename", "studentSurname", "studentEmail", "providerName", "startDate", "endDate", "previousStage", "currentStage", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1313
+ button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1314
+ type: "workflow",
1315
+ name: "Update: placement moved on",
1316
+ recipient: "student",
1317
+ group: "Status updates",
1318
+ },
1319
+ parentPlacementStatusChange: {
1320
+ product: "wex",
1321
+ description: "Sent to the parent when the placement moves to a new stage. Not sent when the parent is the one required to act.",
1322
+ params: ["studentForename", "studentSurname", "studentEmail", "providerName", "startDate", "endDate", "previousStage", "currentStage", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1323
+ button: { text: "View placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1324
+ type: "workflow",
1325
+ name: "Update: placement moved on",
1326
+ recipient: "parent",
1327
+ group: "Status updates",
1328
+ },
1329
+ providerPlacementScheduled: {
1330
+ product: "wex",
1331
+ description: "Sent to the employer once all sign-off is complete and the placement is scheduled to go ahead.",
1332
+ params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1333
+ button: { text: "View placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1334
+ type: "workflow",
1335
+ name: "Placement confirmed",
1336
+ recipient: "provider",
1337
+ group: "Status updates",
1338
+ },
1339
+ studentPlacementRejected: {
1340
+ product: "wex",
1341
+ description: "Sent to the student when staff reject their placement, with the reason.",
1342
+ params: placementRejectedParams,
1343
+ button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1344
+ type: "workflow",
1345
+ name: "Placement rejected",
1346
+ recipient: "student",
1347
+ group: "Status updates",
1188
1348
  },
1189
1349
  studentPlacementStarting: {
1190
1350
  product: "wex",
@@ -1192,7 +1352,9 @@ exports.emailTemplates = {
1192
1352
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "daysUntilPlacement", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1193
1353
  button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1194
1354
  type: "workflow",
1195
- group: "Placement starting"
1355
+ name: "Placement starts soon",
1356
+ recipient: "student",
1357
+ group: "Placement starting",
1196
1358
  },
1197
1359
  providerPlacementStarting: {
1198
1360
  product: "wex",
@@ -1200,7 +1362,9 @@ exports.emailTemplates = {
1200
1362
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1201
1363
  button: { text: "View placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1202
1364
  type: "workflow",
1203
- group: "Placement starting"
1365
+ name: "Placement starts soon",
1366
+ recipient: "provider",
1367
+ group: "Placement starting",
1204
1368
  },
1205
1369
  parentPlacementStarting: {
1206
1370
  product: "wex",
@@ -1208,28 +1372,39 @@ exports.emailTemplates = {
1208
1372
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1209
1373
  button: { text: "View placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1210
1374
  type: "workflow",
1211
- group: "Placement starting"
1375
+ name: "Placement starts soon",
1376
+ recipient: "parent",
1377
+ group: "Placement starting",
1212
1378
  },
1213
- studentPlacementStatusChange: {
1379
+ studentPlacementStartsToday: {
1214
1380
  product: "wex",
1215
- description: "Sent to the student when their placement moves to a new stage.",
1216
- params: ["studentForename", "studentSurname", "studentEmail", "providerName", "startDate", "endDate", "previousStage", "currentStage", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1381
+ description: "Sent to the student on the first day of the placement.",
1382
+ params: placementEmailParams,
1217
1383
  button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1218
- type: "workflow"
1384
+ type: "workflow",
1385
+ name: "Starts today",
1386
+ recipient: "student",
1387
+ group: "Placement starting",
1219
1388
  },
1220
- parentPlacementStatusChange: {
1389
+ providerPlacementStartsToday: {
1221
1390
  product: "wex",
1222
- description: "Sent to the parent when the placement moves to a new stage, if enabled in cohort settings. Not sent when the parent is the one required to act.",
1223
- params: ["studentForename", "studentSurname", "studentEmail", "providerName", "startDate", "endDate", "previousStage", "currentStage", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1391
+ description: "Sent to the employer on the first day of the placement.",
1392
+ params: placementEmailParams,
1224
1393
  button: { text: "View placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1225
- type: "workflow"
1394
+ type: "workflow",
1395
+ name: "Starts today",
1396
+ recipient: "provider",
1397
+ group: "Placement starting",
1226
1398
  },
1227
- providerPlacementScheduled: {
1399
+ providerAttendanceCheck: {
1228
1400
  product: "wex",
1229
- description: "Sent to the employer once all sign-off is complete and the placement is scheduled to go ahead.",
1230
- params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "providerPhone", "providerEmail", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail", "addressLineOne", "addressLineTwo", "city", "postalCode", "country"],
1231
- button: { text: "View placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1232
- type: "workflow"
1401
+ description: "Asks the employer to confirm the student attended, once or every day if daily attendance is on. Only when attendance tracking is on.",
1402
+ params: placementEmailParams,
1403
+ button: { text: "Mark attendance", link: "{{attendancePath}}" },
1404
+ type: "workflow",
1405
+ name: "Was the student in today?",
1406
+ recipient: "provider",
1407
+ group: "During the placement",
1233
1408
  },
1234
1409
  studentPlacementEnded: {
1235
1410
  product: "wex",
@@ -1237,23 +1412,19 @@ exports.emailTemplates = {
1237
1412
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "startDate", "endDate", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1238
1413
  button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1239
1414
  type: "workflow",
1240
- group: "Placement ended"
1415
+ name: "Placement finished",
1416
+ recipient: "student",
1417
+ group: "Placement ended",
1241
1418
  },
1242
1419
  parentPlacementEnded: {
1243
1420
  product: "wex",
1244
- description: "Sent to the parent on the last day of the placement, if parent placement updates are enabled in cohort settings.",
1421
+ description: "Sent to the parent on the last day of the placement.",
1245
1422
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1246
1423
  button: { text: "View placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1247
1424
  type: "workflow",
1248
- group: "Placement ended"
1249
- },
1250
- staffPlacementEnded: {
1251
- product: "wex",
1252
- description: "Sent to the cohort contact on the last day of each placement, if enabled in cohort settings.",
1253
- params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "providerEmail", "startDate", "endDate", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1254
- button: { text: "View placement", link: "/institutes/cohorts/placements/{{pId}}" },
1255
- type: "workflow",
1256
- group: "Placement ended"
1425
+ name: "Placement finished",
1426
+ recipient: "parent",
1427
+ group: "Placement ended",
1257
1428
  },
1258
1429
  studentFeedbackRequest: {
1259
1430
  product: "wex",
@@ -1261,7 +1432,9 @@ exports.emailTemplates = {
1261
1432
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "startDate", "endDate", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1262
1433
  button: { text: "Complete feedback", link: "/institutes/placements/{{pId}}" },
1263
1434
  type: "workflow",
1264
- group: "Feedback"
1435
+ name: "Please give feedback",
1436
+ recipient: "student",
1437
+ group: "Feedback",
1265
1438
  },
1266
1439
  parentFeedbackRequest: {
1267
1440
  product: "wex",
@@ -1269,7 +1442,9 @@ exports.emailTemplates = {
1269
1442
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "startDate", "endDate", "parentEmail", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1270
1443
  button: { text: "Complete feedback", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1271
1444
  type: "workflow",
1272
- group: "Feedback"
1445
+ name: "Please give feedback",
1446
+ recipient: "parent",
1447
+ group: "Feedback",
1273
1448
  },
1274
1449
  providerFeedbackRequest: {
1275
1450
  product: "wex",
@@ -1277,7 +1452,84 @@ exports.emailTemplates = {
1277
1452
  params: ["studentForename", "studentSurname", "studentEmail", "providerName", "providerForename", "providerSurname", "startDate", "endDate", "instituteName", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1278
1453
  button: { text: "Complete feedback", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1279
1454
  type: "workflow",
1280
- group: "Feedback"
1455
+ name: "Please give feedback",
1456
+ recipient: "provider",
1457
+ group: "Feedback",
1458
+ },
1459
+ studentAdditionalInformation: {
1460
+ product: "wex",
1461
+ description: "Sent when the workflow gains forms or files after the student's placement passed that stage.",
1462
+ params: placementActionParams,
1463
+ button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1464
+ type: "workflow",
1465
+ name: "More information needed",
1466
+ recipient: "student",
1467
+ group: "Other",
1468
+ locked: true,
1469
+ },
1470
+ parentAdditionalInformation: {
1471
+ product: "wex",
1472
+ description: "Sent when the workflow gains forms or files after the placement passed the parent's stage.",
1473
+ params: placementActionParams,
1474
+ button: { text: "Review placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1475
+ type: "workflow",
1476
+ name: "More information needed",
1477
+ recipient: "parent",
1478
+ group: "Other",
1479
+ locked: true,
1480
+ },
1481
+ providerAdditionalInformation: {
1482
+ product: "wex",
1483
+ description: "Sent when the workflow gains forms or files after the placement passed the employer's stage.",
1484
+ params: placementActionParams,
1485
+ button: { text: "Review placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1486
+ type: "workflow",
1487
+ name: "More information needed",
1488
+ recipient: "provider",
1489
+ group: "Other",
1490
+ locked: true,
1491
+ },
1492
+ studentOnboardingReminder: {
1493
+ product: "wex",
1494
+ description: "Sent to the student when the employer's onboarding deadline is today, or the employer asks for it to be resent.",
1495
+ params: placementEmailParams,
1496
+ button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1497
+ type: "workflow",
1498
+ name: "Complete onboarding",
1499
+ recipient: "student",
1500
+ group: "Other",
1501
+ locked: true,
1502
+ },
1503
+ providerReuploadDocument: {
1504
+ product: "wex",
1505
+ description: "Sent to the employer when staff reject an uploaded insurance, risk assessment or DBS check, with the reason.",
1506
+ params: placementRejectedParams,
1507
+ button: { text: "Review placement", link: "/review/{{uid}}/{{pId}}/{{key}}" },
1508
+ type: "workflow",
1509
+ name: "Please reupload a document",
1510
+ recipient: "provider",
1511
+ group: "Other",
1512
+ locked: true,
1513
+ },
1514
+ studentReuploadDocument: {
1515
+ product: "wex",
1516
+ description: "Sent to the student when staff reject their onboarding, with the reason.",
1517
+ params: placementRejectedParams,
1518
+ button: { text: "View placement", link: "/institutes/placements/{{pId}}" },
1519
+ type: "workflow",
1520
+ name: "Please redo onboarding",
1521
+ recipient: "student",
1522
+ group: "Other",
1523
+ locked: true,
1524
+ },
1525
+ providerStudentWithdrawn: {
1526
+ product: "wex",
1527
+ description: "Sent to the employer when the student withdraws from the placement.",
1528
+ params: placementEmailParams,
1529
+ type: "workflow",
1530
+ name: "Student withdrawn",
1531
+ recipient: "provider",
1532
+ group: "Other",
1281
1533
  },
1282
1534
  studentActivation: {
1283
1535
  product: "wex",