placementt-core 1.400.939 → 1.400.941
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/benchmarkEvidenceRules.d.ts +113 -0
- package/lib/benchmarkEvidenceRules.js +201 -0
- package/lib/benchmarkEvidenceRules.js.map +1 -0
- package/lib/benchmarkEvidenceRules.test.d.ts +1 -0
- package/lib/benchmarkEvidenceRules.test.js +77 -0
- package/lib/benchmarkEvidenceRules.test.js.map +1 -0
- package/lib/compassExport.d.ts +64 -0
- package/lib/compassExport.js +127 -0
- package/lib/compassExport.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/portfolioAggregate.d.ts +169 -0
- package/lib/portfolioAggregate.js +344 -0
- package/lib/portfolioAggregate.js.map +1 -0
- package/lib/typeDefinitions.d.ts +12 -0
- package/package.json +1 -1
- package/src/benchmarkEvidenceRules.test.ts +98 -0
- package/src/benchmarkEvidenceRules.ts +247 -0
- package/src/compassExport.ts +161 -0
- package/src/index.ts +3 -0
- package/src/portfolioAggregate.ts +515 -0
- package/src/typeDefinitions.ts +21 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { ExternalEvent, StudentActivity } from "./typeDefinitions";
|
|
2
|
+
/**
|
|
3
|
+
* ─── Single source of truth for Gatsby Benchmark *evidence* ───────────────────
|
|
4
|
+
*
|
|
5
|
+
* This module lives beside compassExport on purpose. The Benchmarks dashboard and
|
|
6
|
+
* the Compass+ export must never disagree about which benchmarks an event counts
|
|
7
|
+
* for, so both derive from the SAME mapping. compassExport owns what can be
|
|
8
|
+
* *exported* (COMPASS_VALID_ACTIVITY_BENCHMARKS = 2-8, COMPASS_PAL_BENCHMARKS =
|
|
9
|
+
* 5-7); this module owns what counts as *evidence coverage* on the dashboard, and
|
|
10
|
+
* it imports those constants rather than re-declaring them.
|
|
11
|
+
*
|
|
12
|
+
* Framing rule the whole feature obeys: CareerThread is not a Compass replacement
|
|
13
|
+
* and never shows an official benchmark "score". Schools still self-report in
|
|
14
|
+
* Compass. This module classifies *evidence* so the dashboard can show what exists
|
|
15
|
+
* and where the gaps are; it computes coverage, not compliance.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GATSBY_BENCHMARK_NUMBERS: readonly [1, 2, 3, 4, 5, 6, 7, 8];
|
|
18
|
+
export type GatsbyBenchmarkNumber = (typeof GATSBY_BENCHMARK_NUMBERS)[number];
|
|
19
|
+
/**
|
|
20
|
+
* Where a benchmark's evidence comes from on CareerThread. Drives how the dashboard
|
|
21
|
+
* renders each card and whether it can show a coverage percentage at all.
|
|
22
|
+
*/
|
|
23
|
+
export type BenchmarkEvidenceSource = "provision" | "destinations" | "events" | "eventsAndActivities" | "eventsAndPlacements" | "untracked";
|
|
24
|
+
export type BenchmarkMeta = {
|
|
25
|
+
number: GatsbyBenchmarkNumber;
|
|
26
|
+
/** Short title (no "GB"/"score" wording). */
|
|
27
|
+
name: string;
|
|
28
|
+
/** One-line, plain-English description for the overview card. */
|
|
29
|
+
description: string;
|
|
30
|
+
source: BenchmarkEvidenceSource;
|
|
31
|
+
/**
|
|
32
|
+
* Whether this benchmark yields a per-student coverage number. False for BM1
|
|
33
|
+
* (provision-level, shown as an informational card) and BM8 (untracked, shown
|
|
34
|
+
* as an honest empty state). The dashboard must not render a coverage % for a
|
|
35
|
+
* benchmark where this is false.
|
|
36
|
+
*/
|
|
37
|
+
countsTowardCoverage: boolean;
|
|
38
|
+
/** True for 5-7: the PAL Compliance flag is meaningful (mirrors COMPASS_PAL_BENCHMARKS). */
|
|
39
|
+
palRelevant: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Benchmarks that produce a coverage percentage on the matrix / cards. Deliberately
|
|
43
|
+
* BM2-8 excluding the two that can't be a per-student coverage number: BM1
|
|
44
|
+
* (provision) and BM8 (untracked). Derived from the Compass export's valid set so
|
|
45
|
+
* the two files can't drift.
|
|
46
|
+
*/
|
|
47
|
+
export declare const BENCHMARK_COVERAGE_NUMBERS: GatsbyBenchmarkNumber[];
|
|
48
|
+
export declare const BENCHMARK_META: Record<GatsbyBenchmarkNumber, BenchmarkMeta>;
|
|
49
|
+
/**
|
|
50
|
+
* StudentActivity.activityType → the benchmark(s) that activity is evidence for.
|
|
51
|
+
* Employer-facing encounters count towards BM5; first-hand workplace experiences
|
|
52
|
+
* count towards BM6. "workshop"/"onlineProgramme" are treated as employer
|
|
53
|
+
* encounters (BM5). "other" is intentionally unmapped: we don't guess a benchmark
|
|
54
|
+
* from an untyped activity (that would fabricate coverage).
|
|
55
|
+
*/
|
|
56
|
+
export declare const ACTIVITY_TYPE_BENCHMARKS: Record<StudentActivity["activityType"], GatsbyBenchmarkNumber[]>;
|
|
57
|
+
/**
|
|
58
|
+
* The benchmarks an event provides evidence for: its tagged Gatsby benchmarks,
|
|
59
|
+
* limited to the ones the dashboard tracks per-benchmark (2-8). GB1 is excluded
|
|
60
|
+
* here exactly as it is excluded from the export — a GB1-only event is a
|
|
61
|
+
* programme-level statement, not per-pupil evidence.
|
|
62
|
+
*/
|
|
63
|
+
export declare function eventEvidenceBenchmarks(event: Pick<ExternalEvent, "gatsbyBenchmarks">): GatsbyBenchmarkNumber[];
|
|
64
|
+
/** Whether an event is tagged as evidence for a specific benchmark. */
|
|
65
|
+
export declare function eventProvidesBenchmark(event: Pick<ExternalEvent, "gatsbyBenchmarks">, benchmark: GatsbyBenchmarkNumber): boolean;
|
|
66
|
+
/** The benchmarks a logged student activity is evidence for. */
|
|
67
|
+
export declare function activityEvidenceBenchmarks(activity: Pick<StudentActivity, "activityType">): GatsbyBenchmarkNumber[];
|
|
68
|
+
/**
|
|
69
|
+
* A PAL-compliant provider encounter: the event carries the existing PAL flag AND
|
|
70
|
+
* is tagged with a PAL-relevant benchmark (5-7). Same rule the export uses when
|
|
71
|
+
* deciding whether to stamp the PAL Compliance column.
|
|
72
|
+
*/
|
|
73
|
+
export declare function isPalCompliantProviderEncounter(event: Pick<ExternalEvent, "palCompliant" | "gatsbyBenchmarks">): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* ─── PAL phases (s.42B Education Act 1997) ─────────────────────────────────────
|
|
76
|
+
* Provider Access Legislation expects two provider encounters in each of three
|
|
77
|
+
* phases. The dashboard's PAL panel counts PAL-compliant encounters per phase
|
|
78
|
+
* against this target.
|
|
79
|
+
*/
|
|
80
|
+
export declare const PAL_ENCOUNTERS_PER_PHASE = 2;
|
|
81
|
+
export type PalPhase = {
|
|
82
|
+
/** 1 | 2 | 3 */
|
|
83
|
+
phase: 1 | 2 | 3;
|
|
84
|
+
label: string;
|
|
85
|
+
yearGroups: number[];
|
|
86
|
+
};
|
|
87
|
+
export declare const PAL_PHASES: PalPhase[];
|
|
88
|
+
/** Which PAL phase a year group falls into, or undefined (e.g. Year 7). */
|
|
89
|
+
export declare function palPhaseForYearGroup(yearGroup: number): PalPhase | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* ─── Academic year ────────────────────────────────────────────────────────────
|
|
92
|
+
* Statutory reporting runs on the academic year (England: 1 Sep - 31 Aug). Coverage
|
|
93
|
+
* on the dashboard is always "this academic year", so evidence classification and
|
|
94
|
+
* the UI must agree on where a date falls. Mirrors the aspiration academic-year rule
|
|
95
|
+
* used in Destinations (rollover at August).
|
|
96
|
+
*/
|
|
97
|
+
/** Academic year label for a date, e.g. "2025-26". Aug (month 8+) rolls to the new year. */
|
|
98
|
+
export declare function academicYearForDate(date?: Date | string): string;
|
|
99
|
+
/** Inclusive [start, end) ISO date bounds (yyyy-mm-dd) for an academic-year label. */
|
|
100
|
+
export declare function academicYearDateRange(academicYear?: string): {
|
|
101
|
+
start: string;
|
|
102
|
+
end: string;
|
|
103
|
+
};
|
|
104
|
+
/** True if an ISO date string falls within the given academic year. */
|
|
105
|
+
export declare function dateInAcademicYear(dateStr: string | undefined, academicYear?: string): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* ─── Coverage indicator ────────────────────────────────────────────────────────
|
|
108
|
+
* Buckets a coverage fraction (0-1) into a neutral→primary scale — deliberately NOT
|
|
109
|
+
* red/green, to avoid compliance theatre. `undefined` when a benchmark carries no
|
|
110
|
+
* coverage number (BM1/BM8) so callers render an informational/empty state instead.
|
|
111
|
+
*/
|
|
112
|
+
export type CoverageBand = "none" | "low" | "partial" | "strong" | "full";
|
|
113
|
+
export declare function coverageBand(fraction: number): CoverageBand;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAL_PHASES = exports.PAL_ENCOUNTERS_PER_PHASE = exports.ACTIVITY_TYPE_BENCHMARKS = exports.BENCHMARK_META = exports.BENCHMARK_COVERAGE_NUMBERS = exports.GATSBY_BENCHMARK_NUMBERS = void 0;
|
|
4
|
+
exports.eventEvidenceBenchmarks = eventEvidenceBenchmarks;
|
|
5
|
+
exports.eventProvidesBenchmark = eventProvidesBenchmark;
|
|
6
|
+
exports.activityEvidenceBenchmarks = activityEvidenceBenchmarks;
|
|
7
|
+
exports.isPalCompliantProviderEncounter = isPalCompliantProviderEncounter;
|
|
8
|
+
exports.palPhaseForYearGroup = palPhaseForYearGroup;
|
|
9
|
+
exports.academicYearForDate = academicYearForDate;
|
|
10
|
+
exports.academicYearDateRange = academicYearDateRange;
|
|
11
|
+
exports.dateInAcademicYear = dateInAcademicYear;
|
|
12
|
+
exports.coverageBand = coverageBand;
|
|
13
|
+
const compassExport_1 = require("./compassExport");
|
|
14
|
+
/**
|
|
15
|
+
* ─── Single source of truth for Gatsby Benchmark *evidence* ───────────────────
|
|
16
|
+
*
|
|
17
|
+
* This module lives beside compassExport on purpose. The Benchmarks dashboard and
|
|
18
|
+
* the Compass+ export must never disagree about which benchmarks an event counts
|
|
19
|
+
* for, so both derive from the SAME mapping. compassExport owns what can be
|
|
20
|
+
* *exported* (COMPASS_VALID_ACTIVITY_BENCHMARKS = 2-8, COMPASS_PAL_BENCHMARKS =
|
|
21
|
+
* 5-7); this module owns what counts as *evidence coverage* on the dashboard, and
|
|
22
|
+
* it imports those constants rather than re-declaring them.
|
|
23
|
+
*
|
|
24
|
+
* Framing rule the whole feature obeys: CareerThread is not a Compass replacement
|
|
25
|
+
* and never shows an official benchmark "score". Schools still self-report in
|
|
26
|
+
* Compass. This module classifies *evidence* so the dashboard can show what exists
|
|
27
|
+
* and where the gaps are; it computes coverage, not compliance.
|
|
28
|
+
*/
|
|
29
|
+
exports.GATSBY_BENCHMARK_NUMBERS = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
30
|
+
/**
|
|
31
|
+
* Benchmarks that produce a coverage percentage on the matrix / cards. Deliberately
|
|
32
|
+
* BM2-8 excluding the two that can't be a per-student coverage number: BM1
|
|
33
|
+
* (provision) and BM8 (untracked). Derived from the Compass export's valid set so
|
|
34
|
+
* the two files can't drift.
|
|
35
|
+
*/
|
|
36
|
+
exports.BENCHMARK_COVERAGE_NUMBERS = compassExport_1.COMPASS_VALID_ACTIVITY_BENCHMARKS.filter((b) => b !== 8);
|
|
37
|
+
exports.BENCHMARK_META = {
|
|
38
|
+
1: {
|
|
39
|
+
number: 1,
|
|
40
|
+
name: "A stable careers programme",
|
|
41
|
+
description: "A written, resourced careers programme that pupils, parents, staff and employers all understand.",
|
|
42
|
+
source: "provision",
|
|
43
|
+
countsTowardCoverage: false,
|
|
44
|
+
palRelevant: false,
|
|
45
|
+
},
|
|
46
|
+
2: {
|
|
47
|
+
number: 2,
|
|
48
|
+
name: "Learning from career & labour market information",
|
|
49
|
+
description: "Every pupil, and their parents, can access good-quality career and labour-market information.",
|
|
50
|
+
source: "events",
|
|
51
|
+
countsTowardCoverage: true,
|
|
52
|
+
palRelevant: false,
|
|
53
|
+
},
|
|
54
|
+
3: {
|
|
55
|
+
number: 3,
|
|
56
|
+
name: "Addressing the needs of each pupil",
|
|
57
|
+
description: "Careers support is tailored to each pupil, and records are kept and acted on.",
|
|
58
|
+
source: "destinations",
|
|
59
|
+
countsTowardCoverage: true,
|
|
60
|
+
palRelevant: false,
|
|
61
|
+
},
|
|
62
|
+
4: {
|
|
63
|
+
number: 4,
|
|
64
|
+
name: "Linking curriculum learning to careers",
|
|
65
|
+
description: "Subject teaching shows pupils how what they learn is relevant to a wide range of careers.",
|
|
66
|
+
source: "events",
|
|
67
|
+
countsTowardCoverage: true,
|
|
68
|
+
palRelevant: false,
|
|
69
|
+
},
|
|
70
|
+
5: {
|
|
71
|
+
number: 5,
|
|
72
|
+
name: "Encounters with employers and employees",
|
|
73
|
+
description: "Every pupil has multiple meaningful encounters with employers and working people.",
|
|
74
|
+
source: "eventsAndActivities",
|
|
75
|
+
countsTowardCoverage: true,
|
|
76
|
+
palRelevant: true,
|
|
77
|
+
},
|
|
78
|
+
6: {
|
|
79
|
+
number: 6,
|
|
80
|
+
name: "Experiences of workplaces",
|
|
81
|
+
description: "Every pupil has first-hand experience of a workplace to help their exploration of careers.",
|
|
82
|
+
source: "eventsAndPlacements",
|
|
83
|
+
countsTowardCoverage: true,
|
|
84
|
+
palRelevant: true,
|
|
85
|
+
},
|
|
86
|
+
7: {
|
|
87
|
+
number: 7,
|
|
88
|
+
name: "Encounters with further & higher education",
|
|
89
|
+
description: "Every pupil understands the full range of learning routes — academic, technical and apprenticeships.",
|
|
90
|
+
source: "events",
|
|
91
|
+
countsTowardCoverage: true,
|
|
92
|
+
palRelevant: true,
|
|
93
|
+
},
|
|
94
|
+
8: {
|
|
95
|
+
number: 8,
|
|
96
|
+
name: "Personal guidance",
|
|
97
|
+
description: "Every pupil has personal guidance interviews with a careers adviser when they need them.",
|
|
98
|
+
source: "untracked",
|
|
99
|
+
countsTowardCoverage: false,
|
|
100
|
+
palRelevant: false,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* StudentActivity.activityType → the benchmark(s) that activity is evidence for.
|
|
105
|
+
* Employer-facing encounters count towards BM5; first-hand workplace experiences
|
|
106
|
+
* count towards BM6. "workshop"/"onlineProgramme" are treated as employer
|
|
107
|
+
* encounters (BM5). "other" is intentionally unmapped: we don't guess a benchmark
|
|
108
|
+
* from an untyped activity (that would fabricate coverage).
|
|
109
|
+
*/
|
|
110
|
+
exports.ACTIVITY_TYPE_BENCHMARKS = {
|
|
111
|
+
employerTalk: [5],
|
|
112
|
+
workshop: [5],
|
|
113
|
+
onlineProgramme: [5],
|
|
114
|
+
workShadowing: [6],
|
|
115
|
+
partTimeWork: [6],
|
|
116
|
+
volunteering: [6],
|
|
117
|
+
other: [],
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* The benchmarks an event provides evidence for: its tagged Gatsby benchmarks,
|
|
121
|
+
* limited to the ones the dashboard tracks per-benchmark (2-8). GB1 is excluded
|
|
122
|
+
* here exactly as it is excluded from the export — a GB1-only event is a
|
|
123
|
+
* programme-level statement, not per-pupil evidence.
|
|
124
|
+
*/
|
|
125
|
+
function eventEvidenceBenchmarks(event) {
|
|
126
|
+
return (event.gatsbyBenchmarks || [])
|
|
127
|
+
.filter((b) => compassExport_1.COMPASS_VALID_ACTIVITY_BENCHMARKS.includes(b));
|
|
128
|
+
}
|
|
129
|
+
/** Whether an event is tagged as evidence for a specific benchmark. */
|
|
130
|
+
function eventProvidesBenchmark(event, benchmark) {
|
|
131
|
+
return eventEvidenceBenchmarks(event).includes(benchmark);
|
|
132
|
+
}
|
|
133
|
+
/** The benchmarks a logged student activity is evidence for. */
|
|
134
|
+
function activityEvidenceBenchmarks(activity) {
|
|
135
|
+
return exports.ACTIVITY_TYPE_BENCHMARKS[activity.activityType] || [];
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* A PAL-compliant provider encounter: the event carries the existing PAL flag AND
|
|
139
|
+
* is tagged with a PAL-relevant benchmark (5-7). Same rule the export uses when
|
|
140
|
+
* deciding whether to stamp the PAL Compliance column.
|
|
141
|
+
*/
|
|
142
|
+
function isPalCompliantProviderEncounter(event) {
|
|
143
|
+
if (!event.palCompliant)
|
|
144
|
+
return false;
|
|
145
|
+
return eventEvidenceBenchmarks(event).some((b) => compassExport_1.COMPASS_PAL_BENCHMARKS.includes(b));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* ─── PAL phases (s.42B Education Act 1997) ─────────────────────────────────────
|
|
149
|
+
* Provider Access Legislation expects two provider encounters in each of three
|
|
150
|
+
* phases. The dashboard's PAL panel counts PAL-compliant encounters per phase
|
|
151
|
+
* against this target.
|
|
152
|
+
*/
|
|
153
|
+
exports.PAL_ENCOUNTERS_PER_PHASE = 2;
|
|
154
|
+
exports.PAL_PHASES = [
|
|
155
|
+
{ phase: 1, label: "Years 8-9", yearGroups: [8, 9] },
|
|
156
|
+
{ phase: 2, label: "Years 10-11", yearGroups: [10, 11] },
|
|
157
|
+
{ phase: 3, label: "Years 12-13", yearGroups: [12, 13] },
|
|
158
|
+
];
|
|
159
|
+
/** Which PAL phase a year group falls into, or undefined (e.g. Year 7). */
|
|
160
|
+
function palPhaseForYearGroup(yearGroup) {
|
|
161
|
+
return exports.PAL_PHASES.find((p) => p.yearGroups.includes(yearGroup));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* ─── Academic year ────────────────────────────────────────────────────────────
|
|
165
|
+
* Statutory reporting runs on the academic year (England: 1 Sep - 31 Aug). Coverage
|
|
166
|
+
* on the dashboard is always "this academic year", so evidence classification and
|
|
167
|
+
* the UI must agree on where a date falls. Mirrors the aspiration academic-year rule
|
|
168
|
+
* used in Destinations (rollover at August).
|
|
169
|
+
*/
|
|
170
|
+
/** Academic year label for a date, e.g. "2025-26". Aug (month 8+) rolls to the new year. */
|
|
171
|
+
function academicYearForDate(date = new Date()) {
|
|
172
|
+
const d = typeof date === "string" ? new Date(date) : date;
|
|
173
|
+
const y = d.getFullYear();
|
|
174
|
+
const m = d.getMonth() + 1;
|
|
175
|
+
const startYear = m >= 8 ? y : y - 1;
|
|
176
|
+
return `${startYear}-${String((startYear + 1) % 100).padStart(2, "0")}`;
|
|
177
|
+
}
|
|
178
|
+
/** Inclusive [start, end) ISO date bounds (yyyy-mm-dd) for an academic-year label. */
|
|
179
|
+
function academicYearDateRange(academicYear = academicYearForDate()) {
|
|
180
|
+
const startYear = parseInt(academicYear.split("-")[0], 10);
|
|
181
|
+
return { start: `${startYear}-08-01`, end: `${startYear + 1}-08-01` };
|
|
182
|
+
}
|
|
183
|
+
/** True if an ISO date string falls within the given academic year. */
|
|
184
|
+
function dateInAcademicYear(dateStr, academicYear = academicYearForDate()) {
|
|
185
|
+
if (!dateStr)
|
|
186
|
+
return false;
|
|
187
|
+
const { start, end } = academicYearDateRange(academicYear);
|
|
188
|
+
return dateStr >= start && dateStr < end;
|
|
189
|
+
}
|
|
190
|
+
function coverageBand(fraction) {
|
|
191
|
+
if (fraction <= 0)
|
|
192
|
+
return "none";
|
|
193
|
+
if (fraction < 0.34)
|
|
194
|
+
return "low";
|
|
195
|
+
if (fraction < 0.67)
|
|
196
|
+
return "partial";
|
|
197
|
+
if (fraction < 1)
|
|
198
|
+
return "strong";
|
|
199
|
+
return "full";
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=benchmarkEvidenceRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"benchmarkEvidenceRules.js","sourceRoot":"","sources":["../src/benchmarkEvidenceRules.ts"],"names":[],"mappings":";;;AAuJA,0DAGC;AAGD,wDAEC;AAGD,gEAEC;AAOD,0EAGC;AAwBD,oDAEC;AAWD,kDAMC;AAGD,sDAGC;AAGD,gDAIC;AAUD,oCAMC;AArPD,mDAA0F;AAE1F;;;;;;;;;;;;;;GAcG;AAEU,QAAA,wBAAwB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAC;AAiC1E;;;;;GAKG;AACU,QAAA,0BAA0B,GACnC,iDAAiC,CAAC,MAAM,CAAC,CAAC,CAAC,EAA8B,EAAE,CAAC,C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AC,EAAE,GAAG,CAAC,EAAE,CAAC;AAC5E,CAAC;AAED,sFAAsF;AACtF,SAAgB,qBAAqB,CAAC,eAAuB,mBAAmB,EAAE;IAC9E,MAAM,SAAS,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3D,OAAO,EAAC,KAAK,EAAE,GAAG,SAAS,QAAQ,EAAE,GAAG,EAAE,GAAG,SAAS,GAAG,CAAC,QAAQ,EAAC,CAAC;AACxE,CAAC;AAED,uEAAuE;AACvE,SAAgB,kBAAkB,CAAC,OAAyB,EAAE,eAAuB,mBAAmB,EAAE;IACtG,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,MAAM,EAAC,KAAK,EAAE,GAAG,EAAC,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAC;IACzD,OAAO,OAAO,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,CAAC;AAC7C,CAAC;AAUD,SAAgB,YAAY,CAAC,QAAgB;IACzC,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,MAAM,CAAC;IACjC,IAAI,QAAQ,GAAG,IAAI;QAAE,OAAO,KAAK,CAAC;IAClC,IAAI,QAAQ,GAAG,IAAI;QAAE,OAAO,SAAS,CAAC;IACtC,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,QAAQ,CAAC;IAClC,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const benchmarkEvidenceRules_1 = require("./benchmarkEvidenceRules");
|
|
4
|
+
const compassExport_1 = require("./compassExport");
|
|
5
|
+
describe("benchmarkEvidenceRules single-source consistency", () => {
|
|
6
|
+
it("stays consistent with the Compass export's valid activity benchmarks (2-8)", () => {
|
|
7
|
+
// Coverage numbers are the export-valid set minus BM8 (untracked on CareerThread).
|
|
8
|
+
expect(benchmarkEvidenceRules_1.BENCHMARK_COVERAGE_NUMBERS).toEqual(compassExport_1.COMPASS_VALID_ACTIVITY_BENCHMARKS.filter((b) => b !== 8));
|
|
9
|
+
expect(benchmarkEvidenceRules_1.BENCHMARK_COVERAGE_NUMBERS).not.toContain(1);
|
|
10
|
+
expect(benchmarkEvidenceRules_1.BENCHMARK_COVERAGE_NUMBERS).not.toContain(8);
|
|
11
|
+
});
|
|
12
|
+
it("marks BM1 as provision-level and BM8 as untracked — neither counts toward coverage", () => {
|
|
13
|
+
expect(benchmarkEvidenceRules_1.BENCHMARK_META[1].countsTowardCoverage).toBe(false);
|
|
14
|
+
expect(benchmarkEvidenceRules_1.BENCHMARK_META[1].source).toBe("provision");
|
|
15
|
+
expect(benchmarkEvidenceRules_1.BENCHMARK_META[8].countsTowardCoverage).toBe(false);
|
|
16
|
+
expect(benchmarkEvidenceRules_1.BENCHMARK_META[8].source).toBe("untracked");
|
|
17
|
+
});
|
|
18
|
+
it("flags PAL relevance for exactly benchmarks 5-7", () => {
|
|
19
|
+
[1, 2, 3, 4, 5, 6, 7, 8].forEach((b) => {
|
|
20
|
+
expect(benchmarkEvidenceRules_1.BENCHMARK_META[b].palRelevant)
|
|
21
|
+
.toBe(compassExport_1.COMPASS_PAL_BENCHMARKS.includes(b));
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
describe("event evidence classification", () => {
|
|
26
|
+
it("keeps tagged 2-8 benchmarks and drops GB1", () => {
|
|
27
|
+
expect((0, benchmarkEvidenceRules_1.eventEvidenceBenchmarks)({ gatsbyBenchmarks: [1, 5, 7] })).toEqual([5, 7]);
|
|
28
|
+
expect((0, benchmarkEvidenceRules_1.eventProvidesBenchmark)({ gatsbyBenchmarks: [1] }, 1)).toBe(false);
|
|
29
|
+
expect((0, benchmarkEvidenceRules_1.eventProvidesBenchmark)({ gatsbyBenchmarks: [5] }, 5)).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
it("counts a PAL encounter only when flagged AND tagged 5-7", () => {
|
|
32
|
+
expect((0, benchmarkEvidenceRules_1.isPalCompliantProviderEncounter)({ palCompliant: true, gatsbyBenchmarks: [7] })).toBe(true);
|
|
33
|
+
expect((0, benchmarkEvidenceRules_1.isPalCompliantProviderEncounter)({ palCompliant: true, gatsbyBenchmarks: [4] })).toBe(false);
|
|
34
|
+
expect((0, benchmarkEvidenceRules_1.isPalCompliantProviderEncounter)({ palCompliant: false, gatsbyBenchmarks: [7] })).toBe(false);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe("student activity classification", () => {
|
|
38
|
+
it("maps employer encounters to BM5 and workplace experiences to BM6", () => {
|
|
39
|
+
expect((0, benchmarkEvidenceRules_1.activityEvidenceBenchmarks)({ activityType: "employerTalk" })).toEqual([5]);
|
|
40
|
+
expect((0, benchmarkEvidenceRules_1.activityEvidenceBenchmarks)({ activityType: "workShadowing" })).toEqual([6]);
|
|
41
|
+
expect((0, benchmarkEvidenceRules_1.activityEvidenceBenchmarks)({ activityType: "partTimeWork" })).toEqual([6]);
|
|
42
|
+
});
|
|
43
|
+
it("never fabricates a benchmark from an untyped 'other' activity", () => {
|
|
44
|
+
expect((0, benchmarkEvidenceRules_1.activityEvidenceBenchmarks)({ activityType: "other" })).toEqual([]);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe("PAL phases", () => {
|
|
48
|
+
it("assigns year groups to the three statutory phases and leaves Year 7 unphased", () => {
|
|
49
|
+
expect((0, benchmarkEvidenceRules_1.palPhaseForYearGroup)(9)?.phase).toBe(1);
|
|
50
|
+
expect((0, benchmarkEvidenceRules_1.palPhaseForYearGroup)(11)?.phase).toBe(2);
|
|
51
|
+
expect((0, benchmarkEvidenceRules_1.palPhaseForYearGroup)(13)?.phase).toBe(3);
|
|
52
|
+
expect((0, benchmarkEvidenceRules_1.palPhaseForYearGroup)(7)).toBeUndefined();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
describe("academic year", () => {
|
|
56
|
+
it("rolls over at August", () => {
|
|
57
|
+
expect((0, benchmarkEvidenceRules_1.academicYearForDate)("2025-09-15")).toBe("2025-26");
|
|
58
|
+
expect((0, benchmarkEvidenceRules_1.academicYearForDate)("2026-07-02")).toBe("2025-26");
|
|
59
|
+
expect((0, benchmarkEvidenceRules_1.academicYearForDate)("2026-08-01")).toBe("2026-27");
|
|
60
|
+
});
|
|
61
|
+
it("produces an inclusive-start, exclusive-end range and tests membership", () => {
|
|
62
|
+
expect((0, benchmarkEvidenceRules_1.academicYearDateRange)("2025-26")).toEqual({ start: "2025-08-01", end: "2026-08-01" });
|
|
63
|
+
expect((0, benchmarkEvidenceRules_1.dateInAcademicYear)("2025-12-01", "2025-26")).toBe(true);
|
|
64
|
+
expect((0, benchmarkEvidenceRules_1.dateInAcademicYear)("2026-08-01", "2025-26")).toBe(false);
|
|
65
|
+
expect((0, benchmarkEvidenceRules_1.dateInAcademicYear)(undefined, "2025-26")).toBe(false);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
describe("coverage bands are neutral (no pass/fail theatre)", () => {
|
|
69
|
+
it("buckets fractions onto a none→full scale", () => {
|
|
70
|
+
expect((0, benchmarkEvidenceRules_1.coverageBand)(0)).toBe("none");
|
|
71
|
+
expect((0, benchmarkEvidenceRules_1.coverageBand)(0.2)).toBe("low");
|
|
72
|
+
expect((0, benchmarkEvidenceRules_1.coverageBand)(0.5)).toBe("partial");
|
|
73
|
+
expect((0, benchmarkEvidenceRules_1.coverageBand)(0.9)).toBe("strong");
|
|
74
|
+
expect((0, benchmarkEvidenceRules_1.coverageBand)(1)).toBe("full");
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=benchmarkEvidenceRules.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"benchmarkEvidenceRules.test.js","sourceRoot":"","s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,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,CAAC,IAAA,qCAAY,EAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,CAAC,IAAA,qCAAY,EAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,MAAM,CAAC,IAAA,qCAAY,EAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ExternalEvent } from "./typeDefinitions";
|
|
2
|
+
/**
|
|
3
|
+
* Benchmarks Compass+ accepts on an individual Activity row. GB1 ("a stable careers programme")
|
|
4
|
+
* describes whole-provision leadership, not a single encounter. CEC's Activities Upload template
|
|
5
|
+
* only offers Benchmarks 2-8 in its Benchmark dropdown, so GB1-only events have nothing to export.
|
|
6
|
+
*/
|
|
7
|
+
export declare const COMPASS_VALID_ACTIVITY_BENCHMARKS: number[];
|
|
8
|
+
/**
|
|
9
|
+
* Benchmarks where the PAL Compliance column is meaningful. Provider Access Legislation covers
|
|
10
|
+
* encounters with technical education/apprenticeship providers, which sit under GB5-7. Compass+
|
|
11
|
+
* only reflects this field on activities tagged with one of these three.
|
|
12
|
+
*/
|
|
13
|
+
export declare const COMPASS_PAL_BENCHMARKS: number[];
|
|
14
|
+
/**
|
|
15
|
+
* Whether CareerThread is currently a CEC-recognised Compass+ "Partner Platform" (the status
|
|
16
|
+
* Unifrog, Xello/Cascaid, Morrisby etc. have). Compass+'s "Partner Platform" upload format tries
|
|
17
|
+
* to auto-detect the source from the file, and an unrecognised source can hit a "Missing Activity
|
|
18
|
+
* Source Data" error with no listed option to resolve it. So while this is false, exports use
|
|
19
|
+
* Compass+'s plain 8-column template instead, the one every Compass+ user already downloads and
|
|
20
|
+
* fills in by hand inside their own account. That format has no source-detection step at all,
|
|
21
|
+
* because it isn't claiming to come from anywhere, so it can't hit that error. The trade-off:
|
|
22
|
+
* that template has no PAL Compliance / Parent Attendance columns, so those two fields are
|
|
23
|
+
* dropped from the file (not from our own data) until this flips to true, at which point the
|
|
24
|
+
* export automatically switches to the full 10-column partner format.
|
|
25
|
+
*/
|
|
26
|
+
export declare const COMPASS_PARTNER_PLATFORM_RECOGNISED = false;
|
|
27
|
+
export declare const COMPASS_ACTIVITY_CSV_HEADERS: string[];
|
|
28
|
+
export type CompassActivityRow = {
|
|
29
|
+
benchmark: number;
|
|
30
|
+
category: string;
|
|
31
|
+
activityName: string;
|
|
32
|
+
startDateTime: string;
|
|
33
|
+
endDateTime: string;
|
|
34
|
+
learnerUpns: string;
|
|
35
|
+
schoolLead: string;
|
|
36
|
+
notes: string;
|
|
37
|
+
palCompliance: "Yes" | "";
|
|
38
|
+
parentAttendance: "Yes" | "";
|
|
39
|
+
};
|
|
40
|
+
export type CompassExportIssue = {
|
|
41
|
+
eventId: string;
|
|
42
|
+
eventName: string;
|
|
43
|
+
level: "blocking" | "warning";
|
|
44
|
+
message: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Checks whether an event is safe to include in a Compass+ export. "blocking" issues mean the
|
|
48
|
+
* event is left out of the file entirely (it would fail Compass+'s own validation and, worse,
|
|
49
|
+
* could silently upload with the wrong benchmark/category). "warning" issues still get exported,
|
|
50
|
+
* but should be shown to staff before they send the file on to a school.
|
|
51
|
+
*/
|
|
52
|
+
export declare function validateCompassExportEvent(event: Partial<ExternalEvent> & {
|
|
53
|
+
id?: string;
|
|
54
|
+
}, learnerCount: number, learnersWithUpnCount: number): CompassExportIssue[];
|
|
55
|
+
/**
|
|
56
|
+
* Expands a single event into one Compass+ Activities-Upload row per valid benchmark. Compass+'s
|
|
57
|
+
* template is one benchmark + one category per row, so an event tagged with multiple benchmarks
|
|
58
|
+
* (e.g. an employer talk logged as both GB5 and GB7) becomes multiple rows sharing the same
|
|
59
|
+
* activity name, dates and learner list. Rows for benchmarks without a mandatory category are
|
|
60
|
+
* skipped: callers should run validateCompassExportEvent first and surface that as a blocking
|
|
61
|
+
* issue rather than silently dropping the row here.
|
|
62
|
+
*/
|
|
63
|
+
export declare function buildCompassActivityRows(event: Partial<ExternalEvent>, learnerUpns: string[]): CompassActivityRow[];
|
|
64
|
+
export declare function compassActivityRowToCsvArray(row: CompassActivityRow): string[];
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMPASS_ACTIVITY_CSV_HEADERS = exports.COMPASS_PARTNER_PLATFORM_RECOGNISED = exports.COMPASS_PAL_BENCHMARKS = exports.COMPASS_VALID_ACTIVITY_BENCHMARKS = void 0;
|
|
4
|
+
exports.validateCompassExportEvent = validateCompassExportEvent;
|
|
5
|
+
exports.buildCompassActivityRows = buildCompassActivityRows;
|
|
6
|
+
exports.compassActivityRowToCsvArray = compassActivityRowToCsvArray;
|
|
7
|
+
/**
|
|
8
|
+
* Benchmarks Compass+ accepts on an individual Activity row. GB1 ("a stable careers programme")
|
|
9
|
+
* describes whole-provision leadership, not a single encounter. CEC's Activities Upload template
|
|
10
|
+
* only offers Benchmarks 2-8 in its Benchmark dropdown, so GB1-only events have nothing to export.
|
|
11
|
+
*/
|
|
12
|
+
exports.COMPASS_VALID_ACTIVITY_BENCHMARKS = [2, 3, 4, 5, 6, 7, 8];
|
|
13
|
+
/**
|
|
14
|
+
* Benchmarks where the PAL Compliance column is meaningful. Provider Access Legislation covers
|
|
15
|
+
* encounters with technical education/apprenticeship providers, which sit under GB5-7. Compass+
|
|
16
|
+
* only reflects this field on activities tagged with one of these three.
|
|
17
|
+
*/
|
|
18
|
+
exports.COMPASS_PAL_BENCHMARKS = [5, 6, 7];
|
|
19
|
+
/**
|
|
20
|
+
* Whether CareerThread is currently a CEC-recognised Compass+ "Partner Platform" (the status
|
|
21
|
+
* Unifrog, Xello/Cascaid, Morrisby etc. have). Compass+'s "Partner Platform" upload format tries
|
|
22
|
+
* to auto-detect the source from the file, and an unrecognised source can hit a "Missing Activity
|
|
23
|
+
* Source Data" error with no listed option to resolve it. So while this is false, exports use
|
|
24
|
+
* Compass+'s plain 8-column template instead, the one every Compass+ user already downloads and
|
|
25
|
+
* fills in by hand inside their own account. That format has no source-detection step at all,
|
|
26
|
+
* because it isn't claiming to come from anywhere, so it can't hit that error. The trade-off:
|
|
27
|
+
* that template has no PAL Compliance / Parent Attendance columns, so those two fields are
|
|
28
|
+
* dropped from the file (not from our own data) until this flips to true, at which point the
|
|
29
|
+
* export automatically switches to the full 10-column partner format.
|
|
30
|
+
*/
|
|
31
|
+
exports.COMPASS_PARTNER_PLATFORM_RECOGNISED = false;
|
|
32
|
+
const COMPASS_ACTIVITY_CSV_HEADERS_NATIVE = [
|
|
33
|
+
"Benchmark", "Main category", "Activity name", "Start Date and Time",
|
|
34
|
+
"End Date and Time", "Learners involved", "School Lead", "Notes",
|
|
35
|
+
];
|
|
36
|
+
const COMPASS_ACTIVITY_CSV_HEADERS_PARTNER = [
|
|
37
|
+
...COMPASS_ACTIVITY_CSV_HEADERS_NATIVE,
|
|
38
|
+
"PAL Compliance", "Parent Attendance",
|
|
39
|
+
];
|
|
40
|
+
exports.COMPASS_ACTIVITY_CSV_HEADERS = exports.COMPASS_PARTNER_PLATFORM_RECOGNISED ?
|
|
41
|
+
COMPASS_ACTIVITY_CSV_HEADERS_PARTNER : COMPASS_ACTIVITY_CSV_HEADERS_NATIVE;
|
|
42
|
+
const formatDbDateTime = (dateStr, timeStr) => {
|
|
43
|
+
if (!dateStr)
|
|
44
|
+
return "";
|
|
45
|
+
const [y, m, d] = dateStr.split("-");
|
|
46
|
+
if (!y || !m || !d)
|
|
47
|
+
return "";
|
|
48
|
+
return `${d}/${m}/${y} ${timeStr || "09:00"}`;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Checks whether an event is safe to include in a Compass+ export. "blocking" issues mean the
|
|
52
|
+
* event is left out of the file entirely (it would fail Compass+'s own validation and, worse,
|
|
53
|
+
* could silently upload with the wrong benchmark/category). "warning" issues still get exported,
|
|
54
|
+
* but should be shown to staff before they send the file on to a school.
|
|
55
|
+
*/
|
|
56
|
+
function validateCompassExportEvent(event, learnerCount, learnersWithUpnCount) {
|
|
57
|
+
const issues = [];
|
|
58
|
+
const eventId = event.id || "";
|
|
59
|
+
const eventName = event.name || "Untitled event";
|
|
60
|
+
const push = (level, message) => issues.push({ eventId, eventName, level, message });
|
|
61
|
+
const validBenchmarks = (event.gatsbyBenchmarks || [])
|
|
62
|
+
.filter((b) => exports.COMPASS_VALID_ACTIVITY_BENCHMARKS.includes(b));
|
|
63
|
+
if (!validBenchmarks.length) {
|
|
64
|
+
push("blocking", "No Gatsby Benchmark (2-8) selected. Benchmark 1 alone can't be uploaded as an individual Compass+ activity.");
|
|
65
|
+
}
|
|
66
|
+
validBenchmarks.forEach((b) => {
|
|
67
|
+
if (!event.gatsbyCategories?.[b]) {
|
|
68
|
+
push("blocking", `Benchmark ${b} is selected but has no Compass+ category. Category is mandatory, Compass+ will reject this row.`);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
if (!event.name)
|
|
72
|
+
push("blocking", "Event has no name.");
|
|
73
|
+
if (!event.startDate)
|
|
74
|
+
push("blocking", "Event has no start date.");
|
|
75
|
+
if (learnerCount > 0 && learnersWithUpnCount === 0) {
|
|
76
|
+
push("warning", "None of the attending learners have a UPN on file. Compass+ won't be able to match this activity to individual learner profiles.");
|
|
77
|
+
}
|
|
78
|
+
else if (learnersWithUpnCount < learnerCount) {
|
|
79
|
+
push("warning", `${learnerCount - learnersWithUpnCount} of ${learnerCount} attending learners are missing a UPN and will be left off this row.`);
|
|
80
|
+
}
|
|
81
|
+
// Not pushed as a per-event issue: whether we're on the native or partner template is a
|
|
82
|
+
// whole-export fact, identical for every row, not something specific to this event. Surface
|
|
83
|
+
// it once at the export-surface level instead (see COMPASS_PARTNER_PLATFORM_RECOGNISED).
|
|
84
|
+
return issues;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Expands a single event into one Compass+ Activities-Upload row per valid benchmark. Compass+'s
|
|
88
|
+
* template is one benchmark + one category per row, so an event tagged with multiple benchmarks
|
|
89
|
+
* (e.g. an employer talk logged as both GB5 and GB7) becomes multiple rows sharing the same
|
|
90
|
+
* activity name, dates and learner list. Rows for benchmarks without a mandatory category are
|
|
91
|
+
* skipped: callers should run validateCompassExportEvent first and surface that as a blocking
|
|
92
|
+
* issue rather than silently dropping the row here.
|
|
93
|
+
*/
|
|
94
|
+
function buildCompassActivityRows(event, learnerUpns) {
|
|
95
|
+
const validBenchmarks = (event.gatsbyBenchmarks || [])
|
|
96
|
+
.filter((b) => exports.COMPASS_VALID_ACTIVITY_BENCHMARKS.includes(b) && event.gatsbyCategories?.[b]);
|
|
97
|
+
return validBenchmarks.map((b) => ({
|
|
98
|
+
benchmark: b,
|
|
99
|
+
category: event.gatsbyCategories?.[b] || "",
|
|
100
|
+
activityName: event.name || "",
|
|
101
|
+
startDateTime: formatDbDateTime(event.startDate, event.startTime),
|
|
102
|
+
endDateTime: formatDbDateTime(event.endDate || event.startDate, event.endTime || event.startTime),
|
|
103
|
+
learnerUpns: learnerUpns.join(";"),
|
|
104
|
+
schoolLead: event.designatedStaffText || "",
|
|
105
|
+
notes: event.description || "",
|
|
106
|
+
palCompliance: (event.palCompliant && exports.COMPASS_PAL_BENCHMARKS.includes(b)) ? "Yes" : "",
|
|
107
|
+
parentAttendance: event.parentAttendance ? "Yes" : "",
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
function compassActivityRowToCsvArray(row) {
|
|
111
|
+
const base = [
|
|
112
|
+
String(row.benchmark),
|
|
113
|
+
row.category,
|
|
114
|
+
row.activityName,
|
|
115
|
+
row.startDateTime,
|
|
116
|
+
row.endDateTime,
|
|
117
|
+
row.learnerUpns,
|
|
118
|
+
row.schoolLead,
|
|
119
|
+
row.notes,
|
|
120
|
+
];
|
|
121
|
+
// Matches COMPASS_ACTIVITY_CSV_HEADERS: only add these two columns once we're on the
|
|
122
|
+
// partner-recognised (10-column) template.
|
|
123
|
+
if (!exports.COMPASS_PARTNER_PLATFORM_RECOGNISED)
|
|
124
|
+
return base;
|
|
125
|
+
return [...base, row.palCompliance, row.parentAttendance];
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=compassExport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compassExport.js","sourceRoot":"","sources":["../src/compassExport.ts"],"names":[],"mappings":";;;AA4EA,gEAsCC;AAUD,4DAmBC;AAED,oEAeC;AA9JD;;;;GAIG;AACU,QAAA,iCAAiC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAEvE;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAEhD;;;;;;;;;;;GAWG;AACU,QAAA,mCAAmC,GAAG,KAAK,CAAC;AAEzD,MAAM,mCAAmC,GAAG;IACxC,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB;IACpE,mBAAmB,EAAE,mBAAmB,EAAE,aAAa,EAAE,OAAO;CACnE,CAAC;AAEF,MAAM,oCAAoC,GAAG;IACzC,GAAG,mCAAmC;IACtC,gBAAgB,EAAE,mBAAmB;CACxC,CAAC;AAEW,QAAA,4BAA4B,GAAG,2CAAmC,CAAC,CAAC;IAC7E,oCAAoC,CAAC,CAAC,CAAC,mCAAmC,CAAC;AAsB/E,MAAM,gBAAgB,GAAG,CAAC,OAAgB,EAAE,OAAgB,EAAU,EAAE;IACpE,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,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,CAAC,mBAAmB,IAAI,EAAE;QAC3C,KAAK,EAAE,KAAK,CAAC,WAAW,IAAI,EAAE;QAC9B,aAAa,EAAE,CAAC,KAAK,CAAC,YAAY,IAAI,8BAAsB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACtF,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;KACxD,CAAC,CAAC,CAAC;AACR,CAAC;AAED,SAAgB,4BAA4B,CAAC,GAAuB;IAChE,MAAM,IAAI,GAAG;QACT,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;QACrB,GAAG,CAAC,QAAQ;QACZ,GAAG,CAAC,YAAY;QAChB,GAAG,CAAC,aAAa;QACjB,GAAG,CAAC,WAAW;QACf,GAAG,CAAC,WAAW;QACf,GAAG,CAAC,UAAU;QACd,GAAG,CAAC,KAAK;KACZ,CAAC;IACF,qFAAqF;IACrF,2CAA2C;IAC3C,IAAI,CAAC,2CAAmC;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAC9D,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export * from "./firebase/firebaseQuery";
|
|
|
9
9
|
export * from "./typeDefinitions";
|
|
10
10
|
export * from "./emailSections";
|
|
11
11
|
export * from "./exportTransformers";
|
|
12
|
+
export * from "./compassExport";
|
|
13
|
+
export * from "./benchmarkEvidenceRules";
|
|
14
|
+
export * from "./portfolioAggregate";
|
|
12
15
|
export * from "./tutorialTips";
|
|
13
16
|
export * from "./constants";
|
|
14
17
|
export * from "./hooks";
|
package/lib/index.js
CHANGED
|
@@ -29,6 +29,9 @@ __exportStar(require("./firebase/firebaseQuery"), exports);
|
|
|
29
29
|
__exportStar(require("./typeDefinitions"), exports);
|
|
30
30
|
__exportStar(require("./emailSections"), exports);
|
|
31
31
|
__exportStar(require("./exportTransformers"), exports);
|
|
32
|
+
__exportStar(require("./compassExport"), exports);
|
|
33
|
+
__exportStar(require("./benchmarkEvidenceRules"), exports);
|
|
34
|
+
__exportStar(require("./portfolioAggregate"), exports);
|
|
32
35
|
__exportStar(require("./tutorialTips"), exports);
|
|
33
36
|
__exportStar(require("./constants"), exports);
|
|
34
37
|
__exportStar(require("./hooks"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,sDAAoC;AACpC,gEAA8C;AAC9C,0DAAwC;AACxC,2DAAyC;AACzC,kDAAgC;AAChC,uDAAqC;AACrC,4DAA0C;AAC1C,2DAAyC;AAEzC,oDAAkC;AAClC,kDAAgC;AAChC,uDAAqC;AACrC,iDAA+B;AAC/B,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,4DAA0C;AAC1C,kDAAgC;AAChC,iDAA+B;AAC/B,2CAAyB;AACzB,4DAA0C;AAC1C,oEAAiD;AACjD,yEAAuD;AACvD,kEAAgD;AAChD,kEAAgD;AAChD,oEAAkD;AAClD,yGAAuF;AACvF,0GAAwF;AACxF,+FAA6E;AAC7E,4DAA0C;AAC1C,oEAAkD;AAClD,gEAA8C;AAC9C,2EAAyD;AACzD,6CAA2B;AAC3B,+CAA6B;AAC7B,6DAAuE;AAA9D,2IAAA,OAAO,OAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,sDAAoC;AACpC,gEAA8C;AAC9C,0DAAwC;AACxC,2DAAyC;AACzC,kDAAgC;AAChC,uDAAqC;AACrC,4DAA0C;AAC1C,2DAAyC;AAEzC,oDAAkC;AAClC,kDAAgC;AAChC,uD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