placementt-core 1.400.1014 → 1.400.1016
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/productResolver.d.ts +8 -10
- package/lib/productResolver.js +28 -4
- package/lib/productResolver.js.map +1 -1
- package/lib/tasksAndTips.d.ts +2 -0
- package/lib/tasksAndTips.js +46 -0
- package/lib/tasksAndTips.js.map +1 -1
- package/lib/typeDefinitions.d.ts +1 -1
- package/package.json +1 -1
- package/src/productResolver.ts +35 -13
- package/src/tasksAndTips.ts +50 -0
- package/src/typeDefinitions.ts +1 -1
- package/src/productResolver.test.ts +0 -156
package/lib/productResolver.d.ts
CHANGED
|
@@ -9,17 +9,12 @@ import { InstituteData } from "./typeDefinitions";
|
|
|
9
9
|
* Three of those are also sub-flags that only apply when `employerEvents` (or the
|
|
10
10
|
* careersHub package) is switched on.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* the
|
|
14
|
-
*
|
|
15
|
-
* skills on their dashboard that staff could not see on their profile. Wex was
|
|
16
|
-
* opt-in for staff (`workExperience &&`) and opt-out for students (`!== false`).
|
|
17
|
-
*
|
|
18
|
-
* This is the single answer. Nav, home, student surfaces and the backend all read
|
|
19
|
-
* it, so they cannot disagree about what a customer bought. Dependency-free.
|
|
12
|
+
* `parents` has no flag at all — a school has a parent database when there are
|
|
13
|
+
* parents in it — so this is a hook: the count is a query, and the answer arrives
|
|
14
|
+
* a tick after the flags do.
|
|
20
15
|
*/
|
|
21
16
|
/** The product a surface can gate on. */
|
|
22
|
-
export type ProductKey = "wex" | "network" | "events" | "skills" | "activities" | "destinations" | "alumni";
|
|
17
|
+
export type ProductKey = "wex" | "network" | "parents" | "events" | "skills" | "activities" | "destinations" | "alumni";
|
|
23
18
|
export type ResolvedProducts = Record<ProductKey, boolean> & {
|
|
24
19
|
/** Package shape, so callers stop testing `package ===` themselves. */
|
|
25
20
|
isTrust: boolean;
|
|
@@ -41,12 +36,15 @@ export type ProductResolverInput = Partial<Pick<InstituteData, "package" | "work
|
|
|
41
36
|
*
|
|
42
37
|
* @param {ProductResolverInput} [institute] the institute, or a partial of it.
|
|
43
38
|
* @param {object} [options] extra context.
|
|
39
|
+
* @param {string[]} [options.oIds] whose parent database to count. A trust holds
|
|
40
|
+
* none on its own oId, so pass its schools'.
|
|
44
41
|
* @param {ProductResolverInput[]} [options.trustSchools] schools beneath a trust.
|
|
45
42
|
* A trust shows a product when any of its schools has it, matching the nav's
|
|
46
43
|
* existing destinations rule.
|
|
47
44
|
* @return {ResolvedProducts} what this institute has.
|
|
48
45
|
*/
|
|
49
|
-
export declare function
|
|
46
|
+
export declare function useProductResolver(institute?: ProductResolverInput, options?: {
|
|
47
|
+
oIds?: string[];
|
|
50
48
|
trustSchools?: ProductResolverInput[];
|
|
51
49
|
}): ResolvedProducts;
|
|
52
50
|
/** Human labels, for checklists, settings and the trust product strip. */
|
package/lib/productResolver.js
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.PRODUCT_LABELS = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
const
|
|
7
|
+
exports.useProductResolver = useProductResolver;
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const firestore_1 = require("firebase/firestore");
|
|
10
|
+
const firebaseQuery_1 = __importDefault(require("./firebase/firebaseQuery"));
|
|
11
|
+
const PRODUCT_ORDER = ["wex", "destinations", "events", "skills", "activities", "network", "parents", "alumni"];
|
|
6
12
|
/** Opt-out flag: undefined means on, only an explicit `false` switches it off. */
|
|
7
13
|
const on = (flag) => flag !== false;
|
|
14
|
+
const firebaseQuery = new firebaseQuery_1.default();
|
|
8
15
|
/**
|
|
9
16
|
* Resolve an institute's products.
|
|
10
17
|
*
|
|
11
18
|
* @param {ProductResolverInput} [institute] the institute, or a partial of it.
|
|
12
19
|
* @param {object} [options] extra context.
|
|
20
|
+
* @param {string[]} [options.oIds] whose parent database to count. A trust holds
|
|
21
|
+
* none on its own oId, so pass its schools'.
|
|
13
22
|
* @param {ProductResolverInput[]} [options.trustSchools] schools beneath a trust.
|
|
14
23
|
* A trust shows a product when any of its schools has it, matching the nav's
|
|
15
24
|
* existing destinations rule.
|
|
16
25
|
* @return {ResolvedProducts} what this institute has.
|
|
17
26
|
*/
|
|
18
|
-
function
|
|
27
|
+
function useProductResolver(institute, options) {
|
|
28
|
+
const [parentCount, setParentCount] = (0, react_1.useState)(0);
|
|
29
|
+
const oIds = options?.oIds || [];
|
|
30
|
+
const scope = oIds.join(",");
|
|
31
|
+
(0, react_1.useEffect)(() => {
|
|
32
|
+
if (!oIds.length) {
|
|
33
|
+
setParentCount(0);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
Promise.all(oIds.map((o) => firebaseQuery.getCount(["parents"], [(0, firestore_1.where)("oId", "==", o)])))
|
|
37
|
+
.then((counts) => setParentCount(counts.reduce((t, c) => t + c, 0)))
|
|
38
|
+
.catch(() => setParentCount(0));
|
|
39
|
+
}, [scope]);
|
|
19
40
|
const i = institute || {};
|
|
20
41
|
const pkg = i.package;
|
|
21
42
|
const isTrust = pkg === "institutes-two";
|
|
@@ -39,10 +60,12 @@ function resolveProduct(institute, options) {
|
|
|
39
60
|
// Opt-out and ungated: every institute gets the employer network unless it is
|
|
40
61
|
// explicitly switched off. Matches Institutes.tsx and the staff home today.
|
|
41
62
|
const network = on(i.network);
|
|
63
|
+
// No flag: the database exists if anyone is in it.
|
|
64
|
+
const parents = parentCount > 0;
|
|
42
65
|
const hubIds = Object.entries(i.careersHubLinks || {})
|
|
43
66
|
.filter(([, link]) => link?.status === "approved")
|
|
44
67
|
.map(([oId]) => oId);
|
|
45
|
-
const products = { wex, network, events, skills, activities, destinations, alumni };
|
|
68
|
+
const products = { wex, network, parents, events, skills, activities, destinations, alumni };
|
|
46
69
|
return {
|
|
47
70
|
...products,
|
|
48
71
|
isTrust,
|
|
@@ -61,6 +84,7 @@ exports.PRODUCT_LABELS = {
|
|
|
61
84
|
skills: "Skills",
|
|
62
85
|
activities: "Activities",
|
|
63
86
|
network: "Employer network",
|
|
87
|
+
parents: "Parent database",
|
|
64
88
|
alumni: "Alumni",
|
|
65
89
|
};
|
|
66
90
|
//# sourceMappingURL=productResolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productResolver.js","sourceRoot":"","sources":["../src/productResolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"productResolver.js","sourceRoot":"","sources":["../src/productResolver.ts"],"names":[],"mappings":";;;;;;AAiEA,gDAyFC;AA1JD,iCAA0C;AAC1C,kDAAyC;AACzC,6EAAqD;AA2CrD,MAAM,aAAa,GACf,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAE9F,kFAAkF;AAClF,MAAM,EAAE,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC;AAE9C,MAAM,aAAa,GAAG,IAAI,uBAAa,EAAE,CAAC;AAE1C;;;;;;;;;;;GAWG;AACH,SAAgB,kBAAkB,CAC9B,SAAgC,EAChC,OAAkE;IAElE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IAElD,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE7B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACf,cAAc,CAAC,CAAC,CAAC,CAAC;YACl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GAAG,WAAW,GAAG,CAAC,CAAC;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,IAAI,EAAE,CAAC;SACjD,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,CAAC;SACjD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAEzB,MAAM,QAAQ,GACV,EAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAC,CAAC;IAE9E,OAAO;QACH,GAAG,QAAQ;QACX,OAAO;QACP,KAAK;QACL,WAAW;QACX,SAAS,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC;QAC5B,MAAM;QACN,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KACpD,CAAC;AACN,CAAC;AAED,0EAA0E;AAC7D,QAAA,cAAc,GAA+B;IACtD,GAAG,EAAE,iBAAiB;IACtB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,MAAM,EAAE,QAAQ;CACnB,CAAC"}
|
package/lib/tasksAndTips.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type ProviderTaskNames = "applicationRequireReview" | "activateStaff" | "
|
|
|
8
8
|
export type TaskItem = {
|
|
9
9
|
title?: string;
|
|
10
10
|
message?: string;
|
|
11
|
+
shortDescription?: string;
|
|
11
12
|
link?: string;
|
|
12
13
|
buttonTitle?: string;
|
|
13
14
|
dismissible?: boolean;
|
|
@@ -21,6 +22,7 @@ export type TipQueryReturnObject = {
|
|
|
21
22
|
itemName?: InstituteTaskNames | InstituteTipNames | StudentTipNames | ProviderTipNames;
|
|
22
23
|
title?: string;
|
|
23
24
|
message?: string;
|
|
25
|
+
shortDescription?: string;
|
|
24
26
|
link?: string;
|
|
25
27
|
buttonTitle?: string;
|
|
26
28
|
dismissible?: boolean;
|
package/lib/tasksAndTips.js
CHANGED
|
@@ -21,6 +21,7 @@ const instituteTips = {
|
|
|
21
21
|
return {
|
|
22
22
|
title: "Add your schools",
|
|
23
23
|
message: "Add your schools. These will show up in the 'Cohorts' tab where you can assign cohorts of students to them.",
|
|
24
|
+
shortDescription: "Add your schools so you can assign cohorts to them.",
|
|
24
25
|
link: "/institutes/organisation/overview",
|
|
25
26
|
buttonTitle: "Add schools",
|
|
26
27
|
dismissible: true
|
|
@@ -38,6 +39,7 @@ const instituteTips = {
|
|
|
38
39
|
return {
|
|
39
40
|
title: "Create a cohort",
|
|
40
41
|
message: "Create a cohort to manage your students, process their placements and track their progress",
|
|
42
|
+
shortDescription: "Create a cohort to manage students and their placements.",
|
|
41
43
|
link: "/institutes/cohorts/new",
|
|
42
44
|
buttonTitle: "Create cohort",
|
|
43
45
|
};
|
|
@@ -58,6 +60,7 @@ const instituteTips = {
|
|
|
58
60
|
...returnObj,
|
|
59
61
|
title: "Upload staff",
|
|
60
62
|
message: "Upload staff to help manage your students",
|
|
63
|
+
shortDescription: "Upload staff to help manage your students.",
|
|
61
64
|
link: "/institutes/organisation/staff/all",
|
|
62
65
|
buttonTitle: "Upload staff",
|
|
63
66
|
};
|
|
@@ -80,6 +83,7 @@ const instituteTips = {
|
|
|
80
83
|
dismissible: true,
|
|
81
84
|
title: "Allow external uploads",
|
|
82
85
|
message: "Allow employers to join your database and share their opportunities with you and your students.",
|
|
86
|
+
shortDescription: "Let employers join your database and share opportunities.",
|
|
83
87
|
link: "/institutes/network/overview#employerSettings",
|
|
84
88
|
buttonTitle: "View Network",
|
|
85
89
|
};
|
|
@@ -99,6 +103,7 @@ const instituteTips = {
|
|
|
99
103
|
...returnObj,
|
|
100
104
|
title: "Upload staff guidance",
|
|
101
105
|
message: "Upload guidance documents to support your staff in coordinating work experience.",
|
|
106
|
+
shortDescription: "Upload guidance documents to support your staff.",
|
|
102
107
|
buttonTitle: "Staff guidance",
|
|
103
108
|
link: `/${user.product}/organisation/guidance`,
|
|
104
109
|
});
|
|
@@ -120,6 +125,7 @@ const instituteTips = {
|
|
|
120
125
|
...returnObj,
|
|
121
126
|
title: "Upload student guidance",
|
|
122
127
|
message: "Upload guidance documents to support your staff with key information.",
|
|
128
|
+
shortDescription: "Upload guidance documents to support your students.",
|
|
123
129
|
buttonTitle: "Student guidance",
|
|
124
130
|
link: `/${user.product}/organisation/guidance`,
|
|
125
131
|
});
|
|
@@ -143,6 +149,7 @@ const instituteTasks = {
|
|
|
143
149
|
severity: "error",
|
|
144
150
|
title: `${staffCount} staff have invalid emails.`,
|
|
145
151
|
message: `${staffCount} staff accounts have invalid email addresses. Delete and reupload these users.`,
|
|
152
|
+
shortDescription: `${staffCount} staff have invalid emails. Delete and reupload them.`,
|
|
146
153
|
link: "/institutes/organisation/staff/all",
|
|
147
154
|
} };
|
|
148
155
|
}
|
|
@@ -161,6 +168,7 @@ const instituteTasks = {
|
|
|
161
168
|
severity: "warning",
|
|
162
169
|
title: `${placementCount} placements are late.`,
|
|
163
170
|
message: `${placementCount} placement${placementCount === 1 ? "" : "s"} ha${placementCount === 1 ? "s" : "ve"} been awaiting sign-off from users for one week. We've contacted all required users, including parents and students, to make them aware.`,
|
|
171
|
+
shortDescription: `${placementCount} placement${placementCount === 1 ? " has" : "s have"} been awaiting sign-off for a week.`,
|
|
164
172
|
link: `/institutes/cohorts/${cohorts.id}/placements?selectedView=allData&id=inProgress&flags=latePlacementStage`,
|
|
165
173
|
} };
|
|
166
174
|
}
|
|
@@ -174,6 +182,7 @@ const instituteTasks = {
|
|
|
174
182
|
severity: "warning",
|
|
175
183
|
title: `${placementCount} placements are late.`,
|
|
176
184
|
message: `Your cohort, ${cohort.name} has ${placementCount} placement${placementCount === 1 ? "" : "s"} ha${placementCount === 1 ? "s" : "ve"} been awaiting sign-off from users for one week. We've contacted all required users, including parents and students, to make them aware.`,
|
|
185
|
+
shortDescription: `${cohort.name}: ${placementCount} placement${placementCount === 1 ? " has" : "s have"} been awaiting sign-off for a week.`,
|
|
177
186
|
link: `/institutes/cohorts/${id}/placements?selectedView=allData&id=inProgress&flags=latePlacementStage`,
|
|
178
187
|
};
|
|
179
188
|
}
|
|
@@ -194,6 +203,7 @@ const instituteTasks = {
|
|
|
194
203
|
severity: "error",
|
|
195
204
|
title: `${placementCount} placements are late.`,
|
|
196
205
|
message: `${placementCount} placement${placementCount === 1 ? "" : "s"} ha${placementCount === 1 ? "s" : "ve"} been awaiting sign-off from users for more than two weeks. We've contacted all required users, including parents and students, to make them aware.`,
|
|
206
|
+
shortDescription: `${placementCount} placement${placementCount === 1 ? " has" : "s have"} been awaiting sign-off for over two weeks.`,
|
|
197
207
|
link: `/institutes/cohorts/${cohorts.id}/placements?selectedView=allData&id=inProgress&flags=stagnantPlacementStage`,
|
|
198
208
|
} };
|
|
199
209
|
}
|
|
@@ -207,6 +217,7 @@ const instituteTasks = {
|
|
|
207
217
|
severity: "error",
|
|
208
218
|
title: `${placementCount} placements are late.`,
|
|
209
219
|
message: `Your cohort, ${cohort.name} has ${placementCount} placement${placementCount === 1 ? "" : "s"} ha${placementCount === 1 ? "s" : "ve"} been awaiting sign-off from users for more than two weeks. We've contacted all required users, including parents and students, to make them aware.`,
|
|
220
|
+
shortDescription: `${cohort.name}: ${placementCount} placement${placementCount === 1 ? " has" : "s have"} been awaiting sign-off for over two weeks.`,
|
|
210
221
|
link: `/institutes/cohorts/${id}/placements?selectedView=allData&id=inProgress&flags=stagnantPlacementStage`,
|
|
211
222
|
};
|
|
212
223
|
}
|
|
@@ -229,6 +240,7 @@ const instituteTasks = {
|
|
|
229
240
|
severity: "info",
|
|
230
241
|
title: `${convos} alumni conversation message${convos > 1 ? "s" : ""} needs approval.`,
|
|
231
242
|
message: `There are ${convos} message${convos > 1 ? "s" : ""} to alumni for you to review and release.`,
|
|
243
|
+
shortDescription: `${convos} alumni message${convos > 1 ? "s" : ""} to review and release.`,
|
|
232
244
|
link: "/institutes/network/alumni/conversations",
|
|
233
245
|
} };
|
|
234
246
|
}
|
|
@@ -243,6 +255,7 @@ const instituteTasks = {
|
|
|
243
255
|
severity: "info",
|
|
244
256
|
title: `${convos} alumni conversation message${convos > 1 ? "s" : ""} needs approval.`,
|
|
245
257
|
message: `There are ${convos} message${convos > 1 ? "s" : ""} to alumni for you to review and release.`,
|
|
258
|
+
shortDescription: `${convos} alumni message${convos > 1 ? "s" : ""} to review and release.`,
|
|
246
259
|
link: `/institutes/network/alumni/conversations/${schools.id}`,
|
|
247
260
|
} };
|
|
248
261
|
}
|
|
@@ -258,6 +271,7 @@ const instituteTasks = {
|
|
|
258
271
|
severity: "info",
|
|
259
272
|
title: `${convos} alumni conversation message${convos > 1 ? "s" : ""} needs approval.`,
|
|
260
273
|
message: `${school.name}, has ${convos} outstanding alumni message${convos > 1 ? "s" : ""} to approve. Click to view.`,
|
|
274
|
+
shortDescription: `${school.name}: ${convos} alumni message${convos > 1 ? "s" : ""} to review and release.`,
|
|
261
275
|
link: `/institutes/network/alumni/conversations/${school.id}`,
|
|
262
276
|
};
|
|
263
277
|
}
|
|
@@ -280,6 +294,7 @@ const instituteTasks = {
|
|
|
280
294
|
severity: "error",
|
|
281
295
|
title: `${studentCount} students have invalid emails.`,
|
|
282
296
|
message: `${studentCount} student accounts have invalid email addresses. Delete and reupload these users.`,
|
|
297
|
+
shortDescription: `${studentCount} students have invalid emails. Delete and reupload them.`,
|
|
283
298
|
link: `/institutes/cohorts/${cohorts.id}/students`,
|
|
284
299
|
} };
|
|
285
300
|
}
|
|
@@ -293,6 +308,7 @@ const instituteTasks = {
|
|
|
293
308
|
severity: "error",
|
|
294
309
|
title: `${studentCount} students have invalid emails.`,
|
|
295
310
|
message: `Your cohort, ${cohort.name}, has ${studentCount} student accounts with invalid email addresses. Delete and reupload these users.`,
|
|
311
|
+
shortDescription: `${cohort.name}: ${studentCount} students have invalid emails. Delete and reupload them.`,
|
|
296
312
|
link: `/institutes/cohorts/${id}/students`,
|
|
297
313
|
};
|
|
298
314
|
}
|
|
@@ -313,6 +329,7 @@ const instituteTasks = {
|
|
|
313
329
|
severity: "primary",
|
|
314
330
|
title: `You have ${reminderCount} reminder${reminderCount > 1 ? "s" : ""}.`,
|
|
315
331
|
message: `You have ${reminderCount} outstanding placement reminder${reminderCount > 1 ? "s" : ""}. Click to view.`,
|
|
332
|
+
shortDescription: `You have ${reminderCount} outstanding placement reminder${reminderCount > 1 ? "s" : ""}.`,
|
|
316
333
|
link: `/institutes/cohorts/${cohorts.id}/placements`,
|
|
317
334
|
} };
|
|
318
335
|
}
|
|
@@ -326,6 +343,7 @@ const instituteTasks = {
|
|
|
326
343
|
severity: "primary",
|
|
327
344
|
title: `You have ${reminderCount} reminder${reminderCount > 1 ? "s" : ""}.`,
|
|
328
345
|
message: `Your cohort, ${cohort.name}, has ${reminderCount} outstanding placement reminder${reminderCount > 1 ? "s" : ""}. Click to view.`,
|
|
346
|
+
shortDescription: `${cohort.name}: ${reminderCount} outstanding placement reminder${reminderCount > 1 ? "s" : ""}.`,
|
|
329
347
|
link: `/institutes/cohorts/${id}/placements`,
|
|
330
348
|
};
|
|
331
349
|
}
|
|
@@ -349,6 +367,7 @@ const instituteTasks = {
|
|
|
349
367
|
severity: "error",
|
|
350
368
|
title: `${placementCount} placements have invalid parent emails.`,
|
|
351
369
|
message: `Your cohort '${cohorts.name}' has placements with invalid parent emails. Click to view these placements.`,
|
|
370
|
+
shortDescription: `${placementCount} placement${placementCount === 1 ? " has an" : "s have"} invalid parent email${placementCount === 1 ? "" : "s"}.`,
|
|
352
371
|
link: `/institutes/cohorts/${cohorts.schoolId ? `${cohorts.schoolId}/${cohorts.id}` : cohorts.id}/placements?selectedView=allData&id=inProgress&flags=parentEmailFailed`,
|
|
353
372
|
} };
|
|
354
373
|
}
|
|
@@ -362,6 +381,7 @@ const instituteTasks = {
|
|
|
362
381
|
severity: "error",
|
|
363
382
|
title: `${placementCount} placements in '${cohort.name}' have invalid parent emails.`,
|
|
364
383
|
message: `Your cohort '${cohort.name}' has placements with invalid parent emails. Click to view these placements.`,
|
|
384
|
+
shortDescription: `${cohort.name}: ${placementCount} placement${placementCount === 1 ? " has an" : "s have"} invalid parent email${placementCount === 1 ? "" : "s"}.`,
|
|
365
385
|
link: `/institutes/cohorts/${cohort.schoolId ? `${cohort.schoolId}/${id}` : id}/placements?selectedView=allData&id=inProgress&flags=parentEmailFailed`,
|
|
366
386
|
buttonTitle: "Review placements",
|
|
367
387
|
};
|
|
@@ -387,6 +407,7 @@ const instituteTasks = {
|
|
|
387
407
|
cohortId: cohorts.id,
|
|
388
408
|
title: "Set up attendance monitoring for placements.",
|
|
389
409
|
message: "CareerThread can email employers throughout student placements, monitoring their attendance. Click to set up.",
|
|
410
|
+
shortDescription: "Set up attendance monitoring for your placements.",
|
|
390
411
|
buttonTitle: "Set Preference"
|
|
391
412
|
} };
|
|
392
413
|
}
|
|
@@ -400,6 +421,7 @@ const instituteTasks = {
|
|
|
400
421
|
cohortId: id,
|
|
401
422
|
title: `Set up attendance monitoring for placements in ${cohort.name}.`,
|
|
402
423
|
message: "CareerThread can email employers throughout student placements, monitoring their attendance. Click to set up.",
|
|
424
|
+
shortDescription: `${cohort.name}: set up attendance monitoring for your placements.`,
|
|
403
425
|
buttonTitle: "Set Preference",
|
|
404
426
|
};
|
|
405
427
|
}
|
|
@@ -423,6 +445,7 @@ const instituteTasks = {
|
|
|
423
445
|
severity: "error",
|
|
424
446
|
title: `${placementCount} placements have expired insurance.`,
|
|
425
447
|
message: `Your cohort '${cohorts.name}' has placements with expired insurance Click to view these placements.`,
|
|
448
|
+
shortDescription: `${placementCount} placement${placementCount === 1 ? " has" : "s have"} expired insurance.`,
|
|
426
449
|
link: `/institutes/cohorts/${cohorts.schoolId ? `${cohorts.schoolId}/${cohorts.id}` : cohorts.id}/placements?selectedView=allData&id=inProgress&flags=insuranceExpired`,
|
|
427
450
|
} };
|
|
428
451
|
}
|
|
@@ -436,6 +459,7 @@ const instituteTasks = {
|
|
|
436
459
|
severity: "error",
|
|
437
460
|
title: `${placementCount} placements in '${cohort.name}' have expired insurance.`,
|
|
438
461
|
message: `Your cohort '${cohort.name}' has placements with expired insurance. Click to view these placements.`,
|
|
462
|
+
shortDescription: `${cohort.name}: ${placementCount} placement${placementCount === 1 ? " has" : "s have"} expired insurance.`,
|
|
439
463
|
link: `/institutes/cohorts/${cohort.schoolId ? `${cohort.schoolId}/${id}` : id}/placements?selectedView=allData&id=inProgress&flags=insuranceExpired`,
|
|
440
464
|
buttonTitle: "Review placements",
|
|
441
465
|
};
|
|
@@ -460,6 +484,7 @@ const instituteTasks = {
|
|
|
460
484
|
severity: "error",
|
|
461
485
|
title: `${placementCount} placements have invalid provider emails.`,
|
|
462
486
|
message: `Your cohort '${cohorts.name}' has placements with invalid provider emails. Click to view these placements.`,
|
|
487
|
+
shortDescription: `${placementCount} placement${placementCount === 1 ? " has an" : "s have"} invalid employer email${placementCount === 1 ? "" : "s"}.`,
|
|
463
488
|
link: `/institutes/cohorts/${cohorts.schoolId ? `${cohorts.schoolId}/${cohorts.id}` : cohorts.id}/placements?selectedView=allData&id=inProgress&flags=providerEmailFailed`,
|
|
464
489
|
} };
|
|
465
490
|
}
|
|
@@ -473,6 +498,7 @@ const instituteTasks = {
|
|
|
473
498
|
severity: "error",
|
|
474
499
|
title: `${placementCount} placements in '${cohort.name}' have invalid provider emails.`,
|
|
475
500
|
message: `Your cohort '${cohort.name}' has placements with invalid provider emails. Click to view these placements.`,
|
|
501
|
+
shortDescription: `${cohort.name}: ${placementCount} placement${placementCount === 1 ? " has an" : "s have"} invalid employer email${placementCount === 1 ? "" : "s"}.`,
|
|
476
502
|
link: `/institutes/cohorts/${cohort.schoolId ? `${cohort.schoolId}/${id}` : id}/placements?selectedView=allData&id=inProgress&flags=providerEmailFailed`,
|
|
477
503
|
buttonTitle: "Review placements",
|
|
478
504
|
};
|
|
@@ -497,6 +523,7 @@ const instituteTasks = {
|
|
|
497
523
|
severity: "primary",
|
|
498
524
|
title: `Sign off on ${count} placement${count === 1 ? "" : "s"}.`,
|
|
499
525
|
message: "Click to view all placements requiring your sign-off.",
|
|
526
|
+
shortDescription: `Sign off on ${count} placement${count === 1 ? "" : "s"}.`,
|
|
500
527
|
buttonTitle: "Open Sign-Off Viewer",
|
|
501
528
|
cohortId: cohorts.id,
|
|
502
529
|
link: `/institutes/cohorts/${cohorts.id}/placements?selectedView=allData&id=inProgress&reqUserType=Staff`
|
|
@@ -512,6 +539,7 @@ const instituteTasks = {
|
|
|
512
539
|
severity: "primary",
|
|
513
540
|
title: `Sign off on ${count} placement${count === 1 ? "" : "s"} in '${cohort.name}'.`,
|
|
514
541
|
message: "Click to view all placements requiring your sign-off.",
|
|
542
|
+
shortDescription: `${cohort.name}: sign off on ${count} placement${count === 1 ? "" : "s"}.`,
|
|
515
543
|
buttonTitle: "Open Sign-Off Viewer",
|
|
516
544
|
cohortId: id,
|
|
517
545
|
link: `/institutes/cohorts/${cohort.id}/placements?selectedView=allData&id=inProgress&reqUserType=Staff`
|
|
@@ -538,6 +566,7 @@ const instituteTasks = {
|
|
|
538
566
|
severity: "primary",
|
|
539
567
|
title: `Verify insurance in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
540
568
|
message: "Click to review insurance documents. We'll show you the documents one by one for you to sign-off on.",
|
|
569
|
+
shortDescription: `Verify insurance in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
541
570
|
buttonTitle: "Open Insurance Viewer",
|
|
542
571
|
cohortId: cohorts.id,
|
|
543
572
|
} };
|
|
@@ -552,6 +581,7 @@ const instituteTasks = {
|
|
|
552
581
|
severity: "primary",
|
|
553
582
|
title: `Verify insurance in ${count} placement${count === 1 ? "" : "s"} in '${cohort.name}'.`,
|
|
554
583
|
message: "Click to review insurance documents. We'll show you the documents one by one for you to sign-off on.",
|
|
584
|
+
shortDescription: `${cohort.name}: verify insurance in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
555
585
|
buttonTitle: "Open Insurance Viewer",
|
|
556
586
|
cohortId: id,
|
|
557
587
|
};
|
|
@@ -608,6 +638,7 @@ const instituteTasks = {
|
|
|
608
638
|
severity: "primary",
|
|
609
639
|
title: `Verify DBS documents in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
610
640
|
message: "Click to review DBS documents documents. We'll show you the documents one by one for you to sign-off on.",
|
|
641
|
+
shortDescription: `Verify DBS documents in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
611
642
|
buttonTitle: "Open DBS Check Viewer",
|
|
612
643
|
cohortId: cohorts.id,
|
|
613
644
|
} };
|
|
@@ -622,6 +653,7 @@ const instituteTasks = {
|
|
|
622
653
|
severity: "primary",
|
|
623
654
|
title: `Verify DBS documents in ${count} placement${count === 1 ? "" : "s"} in '${cohort.name}'.`,
|
|
624
655
|
message: "Click to review DBS documents documents. We'll show you the documents one by one for you to sign-off on.",
|
|
656
|
+
shortDescription: `${cohort.name}: verify DBS documents in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
625
657
|
buttonTitle: "Open DBS Check Viewer",
|
|
626
658
|
cohortId: id,
|
|
627
659
|
};
|
|
@@ -642,6 +674,7 @@ const instituteTasks = {
|
|
|
642
674
|
severity: "primary",
|
|
643
675
|
title: `${openRequests} employer${openRequests === 1 ? " has" : "s have"} requested ${openRequests === 1 ? "an event" : "events"}.`,
|
|
644
676
|
message: "Click to view and respond to pending event requests.",
|
|
677
|
+
shortDescription: `${openRequests} employer event request${openRequests === 1 ? "" : "s"} to respond to.`,
|
|
645
678
|
link: "/institutes/events/employerRequests",
|
|
646
679
|
} };
|
|
647
680
|
}
|
|
@@ -659,6 +692,7 @@ const instituteTasks = {
|
|
|
659
692
|
severity: "primary",
|
|
660
693
|
title: `${openRequests} school${openRequests === 1 ? " has" : "s have"} requested ${openRequests === 1 ? "an event" : "events"}.`,
|
|
661
694
|
message: "Click to view and respond to pending event requests.",
|
|
695
|
+
shortDescription: `${openRequests} school event request${openRequests === 1 ? "" : "s"} to respond to.`,
|
|
662
696
|
link: "/institutes/events/schoolRequests",
|
|
663
697
|
} };
|
|
664
698
|
}
|
|
@@ -677,6 +711,7 @@ const instituteTasks = {
|
|
|
677
711
|
severity: "success",
|
|
678
712
|
title: `${availableAttendees} employer${availableAttendees === 1 ? " is" : "s are"} available.`,
|
|
679
713
|
message: "Click to view employers and confirm their attendance. Employers can't view additional details without your sign-off",
|
|
714
|
+
shortDescription: `${availableAttendees} employer${availableAttendees === 1 ? " is" : "s are"} available — confirm their attendance.`,
|
|
680
715
|
link: `/institutes/event/${eventId}/employers`,
|
|
681
716
|
} };
|
|
682
717
|
}
|
|
@@ -699,6 +734,7 @@ const instituteTasks = {
|
|
|
699
734
|
severity: "success",
|
|
700
735
|
title: `${number} employer${number === 1 ? " is" : "s are"} available for your event: ${event.name}.`,
|
|
701
736
|
message: "Click to view employers and confirm their attendance. Employers can't view additional details without your sign-off",
|
|
737
|
+
shortDescription: `${event.name}: ${number} employer${number === 1 ? " is" : "s are"} available — confirm their attendance.`,
|
|
702
738
|
link: `/institutes/event/${eventId}/employers`,
|
|
703
739
|
};
|
|
704
740
|
}));
|
|
@@ -723,6 +759,7 @@ const instituteTasks = {
|
|
|
723
759
|
severity: "primary",
|
|
724
760
|
title: `Verify risk assessment in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
725
761
|
message: "Click to review risk assessments. We'll show you the documents one by one for you to sign-off on.",
|
|
762
|
+
shortDescription: `Verify risk assessments in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
726
763
|
buttonTitle: "Open Risk Assessment Viewer",
|
|
727
764
|
cohortId: cohorts.id,
|
|
728
765
|
} };
|
|
@@ -737,6 +774,7 @@ const instituteTasks = {
|
|
|
737
774
|
severity: "primary",
|
|
738
775
|
title: `Verify risk assessments in ${count} placement${count === 1 ? "" : "s"} in '${cohort.name}'.`,
|
|
739
776
|
message: "Click to review risk assessments. We'll show you the documents one by one for you to sign-off on.",
|
|
777
|
+
shortDescription: `${cohort.name}: verify risk assessments in ${count} placement${count === 1 ? "" : "s"}.`,
|
|
740
778
|
buttonTitle: "Open Risk Assessment Viewer",
|
|
741
779
|
cohortId: id,
|
|
742
780
|
};
|
|
@@ -767,6 +805,7 @@ const instituteTasks = {
|
|
|
767
805
|
severity: "info",
|
|
768
806
|
title: `${studentCount} students do not have a parent email.`,
|
|
769
807
|
message: `Your cohort '${cohorts.name}' has students without a parent email. To allow proper processing of their placements, add these emails.`,
|
|
808
|
+
shortDescription: `${studentCount} students are missing a parent email.`,
|
|
770
809
|
link: `/institutes/cohorts/${cohorts.id}/students?parentEmail=false`,
|
|
771
810
|
} };
|
|
772
811
|
}
|
|
@@ -787,6 +826,7 @@ const instituteTasks = {
|
|
|
787
826
|
severity: "info",
|
|
788
827
|
title: `${studentCount} students in '${cohort.name}' do not have a parent email.`,
|
|
789
828
|
message: `Your cohort '${cohort.name}' has students without a parent email. To allow proper processing of their placements, add these emails.`,
|
|
829
|
+
shortDescription: `${cohort.name}: ${studentCount} students are missing a parent email.`,
|
|
790
830
|
link: `/institutes/cohorts/${cohort.id}/students?parentEmail=false`,
|
|
791
831
|
buttonTitle: "View students",
|
|
792
832
|
};
|
|
@@ -814,6 +854,7 @@ const instituteTasks = {
|
|
|
814
854
|
severity: "info",
|
|
815
855
|
title: `${studentCount} students in are inactive.`,
|
|
816
856
|
message: `Your cohort '${cohorts.name}' has inactive students. Activate them to enable them to use the platform.`,
|
|
857
|
+
shortDescription: `${studentCount} students are inactive. Activate them to give them access.`,
|
|
817
858
|
link: `/institutes/cohorts/${cohorts.id}/students?status=inactive`,
|
|
818
859
|
} };
|
|
819
860
|
}
|
|
@@ -831,6 +872,7 @@ const instituteTasks = {
|
|
|
831
872
|
severity: "info",
|
|
832
873
|
title: `${studentCount} students in '${cohort.name}' are inactive.`,
|
|
833
874
|
message: `Your cohort '${cohort.name}' has inactive students. Activate them to enable them to use the platform.`,
|
|
875
|
+
shortDescription: `${cohort.name}: ${studentCount} students are inactive. Activate them to give them access.`,
|
|
834
876
|
link: `/institutes/cohorts/${cohort.id}/students?selectedView=allData&id=studentsTable&status=inactive`,
|
|
835
877
|
buttonTitle: "Review students",
|
|
836
878
|
};
|
|
@@ -862,6 +904,7 @@ const instituteTasks = {
|
|
|
862
904
|
...returnObj,
|
|
863
905
|
title: "Upload students",
|
|
864
906
|
message: `Your cohort '${cohort.name}' has no students. Add them in the cohort 'Students' tab`,
|
|
907
|
+
shortDescription: `${cohort.name} has no students. Upload them to get started.`,
|
|
865
908
|
link: `/institutes/cohorts/${id}/students?selectedView=allData&id=studentsTable&status=inactive`,
|
|
866
909
|
buttonTitle: "Upload students",
|
|
867
910
|
};
|
|
@@ -890,6 +933,7 @@ const instituteTasks = {
|
|
|
890
933
|
...returnObj,
|
|
891
934
|
title: "Inactive staff",
|
|
892
935
|
message: `You have ${inactiveStaff} inactive staff members. You can activate them in the 'Staff' cohorts tab.`,
|
|
936
|
+
shortDescription: `${inactiveStaff} staff members are inactive. Activate them to give them access.`,
|
|
893
937
|
} };
|
|
894
938
|
}
|
|
895
939
|
return;
|
|
@@ -914,6 +958,7 @@ const instituteTasks = {
|
|
|
914
958
|
severity: "success",
|
|
915
959
|
title: `${availableAttendees} employer${availableAttendees === 1 ? " is" : "s are"} awaiting your approval to join your database.`,
|
|
916
960
|
message: "Click to view employers and confirm their details. Employers can't be invited to events until they are accepted.",
|
|
961
|
+
shortDescription: `${availableAttendees} employer${availableAttendees === 1 ? " is" : "s are"} awaiting approval to join your database.`,
|
|
917
962
|
link: `/institutes/network/employers`,
|
|
918
963
|
} };
|
|
919
964
|
}
|
|
@@ -932,6 +977,7 @@ const studentTasks = {
|
|
|
932
977
|
severity: "primary",
|
|
933
978
|
title: `Complete onboarding for ${placement.name}`,
|
|
934
979
|
message: `Review onboarding for your placement starting on ${(0, util_2.convertDate)(placement.startDate, "visual")}`,
|
|
980
|
+
shortDescription: `Complete onboarding for ${placement.name}, starting ${(0, util_2.convertDate)(placement.startDate, "visual")}.`,
|
|
935
981
|
link: `/${user.product}/placements/${k}`,
|
|
936
982
|
buttonTitle: "View onboarding",
|
|
937
983
|
}));
|