placementt-core 1.400.1219 → 1.400.1221
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/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/nonUserSchools.ts +0 -11
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
|
-
* Events that already invited schools by email, before the setting existed, 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
|
-
* Events that already invited schools by email, before the setting existed, count as open.
|
|
23
|
-
*/
|
|
24
|
-
const nonUserSchoolsAllowed = (event) => Boolean(event.schoolInvites?.nonUserSchools || 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":[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AI,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/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
|
-
* Events that already invited schools by email, before the setting existed, count as open.
|
|
26
|
-
*/
|
|
27
|
-
export const nonUserSchoolsAllowed = (event: Pick<ExternalEvent, "schoolInvites"|"nonUserSchoolInvitesYear">): boolean =>
|
|
28
|
-
Boolean(event.schoolInvites?.nonUserSchools || 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";
|