placementt-core 1.400.1220 → 1.400.1222
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/callables/events.d.ts +6 -3
- package/lib/callables/events.js +8 -3
- package/lib/callables/events.js.map +1 -1
- package/lib/callables/registry.d.ts +12 -6
- package/lib/nonUserSchools.d.ts +0 -7
- package/lib/nonUserSchools.js +1 -10
- package/lib/nonUserSchools.js.map +1 -1
- package/package.json +1 -1
- package/src/callables/events.ts +8 -3
- package/src/nonUserSchools.ts +0 -11
|
@@ -119,14 +119,17 @@ export declare const eventsCallables: {
|
|
|
119
119
|
}>;
|
|
120
120
|
response: z.ZodObject<{
|
|
121
121
|
invited: z.ZodNumber;
|
|
122
|
+
linked: z.ZodNumber;
|
|
122
123
|
skipped: z.ZodNumber;
|
|
123
124
|
remaining: z.ZodNumber;
|
|
124
125
|
}, "strip", z.ZodTypeAny, {
|
|
125
126
|
skipped: number;
|
|
127
|
+
linked: number;
|
|
126
128
|
invited: number;
|
|
127
129
|
remaining: number;
|
|
128
130
|
}, {
|
|
129
131
|
skipped: number;
|
|
132
|
+
linked: number;
|
|
130
133
|
invited: number;
|
|
131
134
|
remaining: number;
|
|
132
135
|
}>;
|
|
@@ -249,13 +252,13 @@ export declare const eventsCallables: {
|
|
|
249
252
|
students?: number | undefined;
|
|
250
253
|
}>]>;
|
|
251
254
|
response: z.ZodObject<{
|
|
252
|
-
code: z.ZodEnum<["updated", "emailed"]>;
|
|
255
|
+
code: z.ZodEnum<["updated", "emailed", "hasAccount"]>;
|
|
253
256
|
eventSchoolId: z.ZodOptional<z.ZodString>;
|
|
254
257
|
}, "strip", z.ZodTypeAny, {
|
|
255
|
-
code: "updated" | "emailed";
|
|
258
|
+
code: "updated" | "emailed" | "hasAccount";
|
|
256
259
|
eventSchoolId?: string | undefined;
|
|
257
260
|
}, {
|
|
258
|
-
code: "updated" | "emailed";
|
|
261
|
+
code: "updated" | "emailed" | "hasAccount";
|
|
259
262
|
eventSchoolId?: string | undefined;
|
|
260
263
|
}>;
|
|
261
264
|
};
|
package/lib/callables/events.js
CHANGED
|
@@ -54,7 +54,9 @@ exports.eventsCallables = {
|
|
|
54
54
|
}),
|
|
55
55
|
},
|
|
56
56
|
// Hub staff only. Invites schools that aren't on the platform by email alone. Each event this is
|
|
57
|
-
// used on counts once per academic year against InstituteData.hubNonUserSchoolEvents.
|
|
57
|
+
// used on counts once per academic year against InstituteData.hubNonUserSchoolEvents. An address
|
|
58
|
+
// that belongs to a school already in the hub is invited through its account instead (linked),
|
|
59
|
+
// and doesn't use the allowance.
|
|
58
60
|
"events-inviteNonUserSchools": {
|
|
59
61
|
request: zod_1.z.object({
|
|
60
62
|
eventId: zod_1.z.string().min(1),
|
|
@@ -65,6 +67,7 @@ exports.eventsCallables = {
|
|
|
65
67
|
}),
|
|
66
68
|
response: zod_1.z.object({
|
|
67
69
|
invited: zod_1.z.number(),
|
|
70
|
+
linked: zod_1.z.number(),
|
|
68
71
|
skipped: zod_1.z.number(),
|
|
69
72
|
remaining: zod_1.z.number(),
|
|
70
73
|
}),
|
|
@@ -95,7 +98,9 @@ exports.eventsCallables = {
|
|
|
95
98
|
}),
|
|
96
99
|
// Without eventSchoolId, a school signing itself up from the hub's shareable link: eventId
|
|
97
100
|
// and email are then required, and the response carries the new eventSchoolId, or
|
|
98
|
-
// "emailed" when that address already has an invite (its link is emailed, not returned)
|
|
101
|
+
// "emailed" when that address already has an invite (its link is emailed, not returned), or
|
|
102
|
+
// "hasAccount" when it belongs to a school already in the hub, which is invited through its
|
|
103
|
+
// account instead and accepts after logging in.
|
|
99
104
|
zod_1.z.object({
|
|
100
105
|
action: zod_1.z.literal("accept"),
|
|
101
106
|
eventSchoolId: zod_1.z.string().min(1).optional(),
|
|
@@ -123,7 +128,7 @@ exports.eventsCallables = {
|
|
|
123
128
|
}),
|
|
124
129
|
]),
|
|
125
130
|
response: zod_1.z.object({
|
|
126
|
-
code: zod_1.z.enum(["updated", "emailed"]),
|
|
131
|
+
code: zod_1.z.enum(["updated", "emailed", "hasAccount"]),
|
|
127
132
|
eventSchoolId: zod_1.z.string().optional(),
|
|
128
133
|
}),
|
|
129
134
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/callables/events.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAGtB;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,qBAAqB,EAAE;QACnB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;YACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;SACpB,CAAC;QACF,qEAAqE;QACrE,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC;YACvB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC3B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACtC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACtC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAClC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC/B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACjC,CAAC,CAAC;KACN;IACD,uEAAuE;IACvE,2EAA2E;IAC3E,6BAA6B,EAAE;QAC3B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,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C,CAAC;gBAChC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC7B,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACxF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;aAC/C,CAAC;SACL,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;YAClD,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACvC,CAAC;KACL;IACD,yDAAyD;IACzD,+BAA+B,EAAE;QAC7B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAChC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SAC5B,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;SAC5B,CAAC;KACL;CACoB,CAAC"}
|
|
@@ -3317,14 +3317,17 @@ export declare const allCallables: {
|
|
|
3317
3317
|
}>;
|
|
3318
3318
|
response: z.ZodObject<{
|
|
3319
3319
|
invited: z.ZodNumber;
|
|
3320
|
+
linked: z.ZodNumber;
|
|
3320
3321
|
skipped: z.ZodNumber;
|
|
3321
3322
|
remaining: z.ZodNumber;
|
|
3322
3323
|
}, "strip", z.ZodTypeAny, {
|
|
3323
3324
|
skipped: number;
|
|
3325
|
+
linked: number;
|
|
3324
3326
|
invited: number;
|
|
3325
3327
|
remaining: number;
|
|
3326
3328
|
}, {
|
|
3327
3329
|
skipped: number;
|
|
3330
|
+
linked: number;
|
|
3328
3331
|
invited: number;
|
|
3329
3332
|
remaining: number;
|
|
3330
3333
|
}>;
|
|
@@ -3447,13 +3450,13 @@ export declare const allCallables: {
|
|
|
3447
3450
|
students?: number | undefined;
|
|
3448
3451
|
}>]>;
|
|
3449
3452
|
response: z.ZodObject<{
|
|
3450
|
-
code: z.ZodEnum<["updated", "emailed"]>;
|
|
3453
|
+
code: z.ZodEnum<["updated", "emailed", "hasAccount"]>;
|
|
3451
3454
|
eventSchoolId: z.ZodOptional<z.ZodString>;
|
|
3452
3455
|
}, "strip", z.ZodTypeAny, {
|
|
3453
|
-
code: "updated" | "emailed";
|
|
3456
|
+
code: "updated" | "emailed" | "hasAccount";
|
|
3454
3457
|
eventSchoolId?: string | undefined;
|
|
3455
3458
|
}, {
|
|
3456
|
-
code: "updated" | "emailed";
|
|
3459
|
+
code: "updated" | "emailed" | "hasAccount";
|
|
3457
3460
|
eventSchoolId?: string | undefined;
|
|
3458
3461
|
}>;
|
|
3459
3462
|
};
|
|
@@ -3706,14 +3709,17 @@ export declare const callableGroups: {
|
|
|
3706
3709
|
}>;
|
|
3707
3710
|
response: z.ZodObject<{
|
|
3708
3711
|
invited: z.ZodNumber;
|
|
3712
|
+
linked: z.ZodNumber;
|
|
3709
3713
|
skipped: z.ZodNumber;
|
|
3710
3714
|
remaining: z.ZodNumber;
|
|
3711
3715
|
}, "strip", z.ZodTypeAny, {
|
|
3712
3716
|
skipped: number;
|
|
3717
|
+
linked: number;
|
|
3713
3718
|
invited: number;
|
|
3714
3719
|
remaining: number;
|
|
3715
3720
|
}, {
|
|
3716
3721
|
skipped: number;
|
|
3722
|
+
linked: number;
|
|
3717
3723
|
invited: number;
|
|
3718
3724
|
remaining: number;
|
|
3719
3725
|
}>;
|
|
@@ -3836,13 +3842,13 @@ export declare const callableGroups: {
|
|
|
3836
3842
|
students?: number | undefined;
|
|
3837
3843
|
}>]>;
|
|
3838
3844
|
response: z.ZodObject<{
|
|
3839
|
-
code: z.ZodEnum<["updated", "emailed"]>;
|
|
3845
|
+
code: z.ZodEnum<["updated", "emailed", "hasAccount"]>;
|
|
3840
3846
|
eventSchoolId: z.ZodOptional<z.ZodString>;
|
|
3841
3847
|
}, "strip", z.ZodTypeAny, {
|
|
3842
|
-
code: "updated" | "emailed";
|
|
3848
|
+
code: "updated" | "emailed" | "hasAccount";
|
|
3843
3849
|
eventSchoolId?: string | undefined;
|
|
3844
3850
|
}, {
|
|
3845
|
-
code: "updated" | "emailed";
|
|
3851
|
+
code: "updated" | "emailed" | "hasAccount";
|
|
3846
3852
|
eventSchoolId?: string | undefined;
|
|
3847
3853
|
}>;
|
|
3848
3854
|
};
|
package/lib/nonUserSchools.d.ts
CHANGED
|
@@ -9,12 +9,5 @@ export declare const nonUserSchoolEventsYear: (date?: Date) => string;
|
|
|
9
9
|
export declare const nonUserSchoolInviteUsesAllowance: (event: Pick<ExternalEvent, "nonUserSchoolInvitesYear">, date?: Date) => boolean;
|
|
10
10
|
/** Events the hub can still invite email-only schools to this academic year. */
|
|
11
11
|
export declare const nonUserSchoolEventsRemaining: (hub: Pick<InstituteData, "hubNonUserSchoolEvents"> | undefined, date?: Date) => number;
|
|
12
|
-
/**
|
|
13
|
-
* Whether the hub has opened the event to schools not on the platform.
|
|
14
|
-
* Unset on events that already invited schools by email before the setting existed, which count as open.
|
|
15
|
-
*/
|
|
16
|
-
export declare const nonUserSchoolsAllowed: (event: Pick<ExternalEvent, "schoolInvites" | "nonUserSchoolInvitesYear">) => boolean;
|
|
17
|
-
/** Whether schools not on the platform can sign themselves up from the event's shareable link. */
|
|
18
|
-
export declare const nonUserSchoolSignUpLinkOpen: (event: Pick<ExternalEvent, "schoolInvites" | "nonUserSchoolInvitesYear">) => boolean;
|
|
19
12
|
/** The school's display name, whether it's on the platform or was invited by email. */
|
|
20
13
|
export declare const eventSchoolName: (eventSchool: Pick<ExternalEventCareersSchool, "nonUserSchool">, institute?: Pick<InstituteData, "name">) => string;
|
package/lib/nonUserSchools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.eventSchoolName = exports.
|
|
3
|
+
exports.eventSchoolName = exports.nonUserSchoolEventsRemaining = exports.nonUserSchoolInviteUsesAllowance = exports.nonUserSchoolEventsYear = exports.NON_USER_SCHOOL_EVENTS_PER_YEAR = void 0;
|
|
4
4
|
const schedule_1 = require("./surveys/schedule");
|
|
5
5
|
// How many events a careers hub can invite schools to by email alone, per academic year.
|
|
6
6
|
// Kept low so hubs still bring schools onto the platform.
|
|
@@ -17,15 +17,6 @@ exports.nonUserSchoolInviteUsesAllowance = nonUserSchoolInviteUsesAllowance;
|
|
|
17
17
|
/** Events the hub can still invite email-only schools to this academic year. */
|
|
18
18
|
const nonUserSchoolEventsRemaining = (hub, date = new Date()) => Math.max(0, exports.NON_USER_SCHOOL_EVENTS_PER_YEAR - (hub?.hubNonUserSchoolEvents?.[(0, exports.nonUserSchoolEventsYear)(date)] || 0));
|
|
19
19
|
exports.nonUserSchoolEventsRemaining = nonUserSchoolEventsRemaining;
|
|
20
|
-
/**
|
|
21
|
-
* Whether the hub has opened the event to schools not on the platform.
|
|
22
|
-
* Unset on events that already invited schools by email before the setting existed, which count as open.
|
|
23
|
-
*/
|
|
24
|
-
const nonUserSchoolsAllowed = (event) => event.schoolInvites?.nonUserSchools ?? Boolean(event.nonUserSchoolInvitesYear);
|
|
25
|
-
exports.nonUserSchoolsAllowed = nonUserSchoolsAllowed;
|
|
26
|
-
/** Whether schools not on the platform can sign themselves up from the event's shareable link. */
|
|
27
|
-
const nonUserSchoolSignUpLinkOpen = (event) => (0, exports.nonUserSchoolsAllowed)(event) && Boolean(event.schoolInvites?.link);
|
|
28
|
-
exports.nonUserSchoolSignUpLinkOpen = nonUserSchoolSignUpLinkOpen;
|
|
29
20
|
/** The school's display name, whether it's on the platform or was invited by email. */
|
|
30
21
|
const eventSchoolName = (eventSchool, institute) => institute?.name || eventSchool.nonUserSchool?.schoolName || eventSchool.nonUserSchool?.email || "Unknown school";
|
|
31
22
|
exports.eventSchoolName = eventSchoolName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nonUserSchools.js","sourceRoot":"","sources":["../src/nonUserSchools.ts"],"names":[],"mappings":";;;AAAA,iDAAoF;AAGpF,yFAAyF;AACzF,0DAA0D;AAC7C,QAAA,+BAA+B,GAAG,CAAC,CAAC;AAEjD,qEAAqE;AAC9D,MAAM,uBAAuB,GAAG,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,EAAU,EAAE,CACjE,IAAA,iCAAsB,EAAC,IAAA,mCAAwB,EAAC,IAAI,CAAC,CAAC,CAAC;AAD9C,QAAA,uBAAuB,2BACuB;AAE3D;;;GAGG;AACI,MAAM,gCAAgC,GAAG,CAAC,KAAsD,EAAE,IAAI,GAAG,IAAI,IAAI,EAAE,EAAW,EAAE,CACnI,KAAK,CAAC,wBAAwB,KAAK,IAAA,+BAAuB,EAAC,IAAI,CAAC,CAAC;AADxD,QAAA,gCAAgC,oCACwB;AAErE,gFAAgF;AACzE,MAAM,4BAA4B,GAAG,CAAC,GAA4D,EAAE,IAAI,GAAG,IAAI,IAAI,EAAE,EAAU,EAAE,CACpI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,uCAA+B,GAAG,CAAC,GAAG,EAAE,sBAAsB,EAAE,CAAC,IAAA,+BAAuB,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAD1G,QAAA,4BAA4B,gCAC8E;AAEvH
|
|
1
|
+
{"version":3,"file":"nonUserSchools.js","sourceRoot":"","sources":["../src/nonUserSchools.ts"],"names":[],"mappings":";;;AAAA,iDAAoF;AAGpF,yFAAyF;AACzF,0DAA0D;AAC7C,QAAA,+BAA+B,GAAG,CAAC,CAAC;AAEjD,qEAAqE;AAC9D,MAAM,uBAAuB,GAAG,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,EAAU,EAAE,CACjE,IAAA,iCAAsB,EAAC,IAAA,mCAAwB,EAAC,IAAI,CAAC,CAAC,CAAC;AAD9C,QAAA,uBAAuB,2BACuB;AAE3D;;;GAGG;AACI,MAAM,gCAAgC,GAAG,CAAC,KAAsD,EAAE,IAAI,GAAG,IAAI,IAAI,EAAE,EAAW,EAAE,CACnI,KAAK,CAAC,wBAAwB,KAAK,IAAA,+BAAuB,EAAC,IAAI,CAAC,CAAC;AADxD,QAAA,gCAAgC,oCACwB;AAErE,gFAAgF;AACzE,MAAM,4BAA4B,GAAG,CAAC,GAA4D,EAAE,IAAI,GAAG,IAAI,IAAI,EAAE,EAAU,EAAE,CACpI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,uCAA+B,GAAG,CAAC,GAAG,EAAE,sBAAsB,EAAE,CAAC,IAAA,+BAAuB,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAD1G,QAAA,4BAA4B,gCAC8E;AAEvH,uFAAuF;AAChF,MAAM,eAAe,GAAG,CAAC,WAA8D,EAAE,SAAuC,EAAU,EAAE,CAC/I,SAAS,EAAE,IAAI,IAAI,WAAW,CAAC,aAAa,EAAE,UAAU,IAAI,WAAW,CAAC,aAAa,EAAE,KAAK,IAAI,gBAAgB,CAAC;AADxG,QAAA,eAAe,mBACyF"}
|
package/package.json
CHANGED
package/src/callables/events.ts
CHANGED
|
@@ -53,7 +53,9 @@ export const eventsCallables = {
|
|
|
53
53
|
}),
|
|
54
54
|
},
|
|
55
55
|
// Hub staff only. Invites schools that aren't on the platform by email alone. Each event this is
|
|
56
|
-
// used on counts once per academic year against InstituteData.hubNonUserSchoolEvents.
|
|
56
|
+
// used on counts once per academic year against InstituteData.hubNonUserSchoolEvents. An address
|
|
57
|
+
// that belongs to a school already in the hub is invited through its account instead (linked),
|
|
58
|
+
// and doesn't use the allowance.
|
|
57
59
|
"events-inviteNonUserSchools": {
|
|
58
60
|
request: z.object({
|
|
59
61
|
eventId: z.string().min(1),
|
|
@@ -64,6 +66,7 @@ export const eventsCallables = {
|
|
|
64
66
|
}),
|
|
65
67
|
response: z.object({
|
|
66
68
|
invited: z.number(),
|
|
69
|
+
linked: z.number(),
|
|
67
70
|
skipped: z.number(),
|
|
68
71
|
remaining: z.number(),
|
|
69
72
|
}),
|
|
@@ -94,7 +97,9 @@ export const eventsCallables = {
|
|
|
94
97
|
}),
|
|
95
98
|
// Without eventSchoolId, a school signing itself up from the hub's shareable link: eventId
|
|
96
99
|
// and email are then required, and the response carries the new eventSchoolId, or
|
|
97
|
-
// "emailed" when that address already has an invite (its link is emailed, not returned)
|
|
100
|
+
// "emailed" when that address already has an invite (its link is emailed, not returned), or
|
|
101
|
+
// "hasAccount" when it belongs to a school already in the hub, which is invited through its
|
|
102
|
+
// account instead and accepts after logging in.
|
|
98
103
|
z.object({
|
|
99
104
|
action: z.literal("accept"),
|
|
100
105
|
eventSchoolId: z.string().min(1).optional(),
|
|
@@ -122,7 +127,7 @@ export const eventsCallables = {
|
|
|
122
127
|
}),
|
|
123
128
|
]),
|
|
124
129
|
response: z.object({
|
|
125
|
-
code: z.enum(["updated", "emailed"]),
|
|
130
|
+
code: z.enum(["updated", "emailed", "hasAccount"]),
|
|
126
131
|
eventSchoolId: z.string().optional(),
|
|
127
132
|
}),
|
|
128
133
|
},
|
package/src/nonUserSchools.ts
CHANGED
|
@@ -20,17 +20,6 @@ export const nonUserSchoolInviteUsesAllowance = (event: Pick<ExternalEvent, "non
|
|
|
20
20
|
export const nonUserSchoolEventsRemaining = (hub: Pick<InstituteData, "hubNonUserSchoolEvents">|undefined, date = new Date()): number =>
|
|
21
21
|
Math.max(0, NON_USER_SCHOOL_EVENTS_PER_YEAR - (hub?.hubNonUserSchoolEvents?.[nonUserSchoolEventsYear(date)] || 0));
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* Whether the hub has opened the event to schools not on the platform.
|
|
25
|
-
* Unset on events that already invited schools by email before the setting existed, which count as open.
|
|
26
|
-
*/
|
|
27
|
-
export const nonUserSchoolsAllowed = (event: Pick<ExternalEvent, "schoolInvites"|"nonUserSchoolInvitesYear">): boolean =>
|
|
28
|
-
event.schoolInvites?.nonUserSchools ?? Boolean(event.nonUserSchoolInvitesYear);
|
|
29
|
-
|
|
30
|
-
/** Whether schools not on the platform can sign themselves up from the event's shareable link. */
|
|
31
|
-
export const nonUserSchoolSignUpLinkOpen = (event: Pick<ExternalEvent, "schoolInvites"|"nonUserSchoolInvitesYear">): boolean =>
|
|
32
|
-
nonUserSchoolsAllowed(event) && Boolean(event.schoolInvites?.link);
|
|
33
|
-
|
|
34
23
|
/** The school's display name, whether it's on the platform or was invited by email. */
|
|
35
24
|
export const eventSchoolName = (eventSchool: Pick<ExternalEventCareersSchool, "nonUserSchool">, institute?: Pick<InstituteData, "name">): string =>
|
|
36
25
|
institute?.name || eventSchool.nonUserSchool?.schoolName || eventSchool.nonUserSchool?.email || "Unknown school";
|