@casomoltd/nhs-pay 0.32.0 → 0.34.0
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/README.md +24 -22
- package/dist/afc-band.d.ts +4 -4
- package/dist/afc-band.js +4 -4
- package/dist/afc-scales.d.ts +89 -60
- package/dist/afc-scales.js +166 -182
- package/dist/afc-scales.js.map +1 -1
- package/dist/allowances.js +11 -11
- package/dist/allowances.js.map +1 -1
- package/dist/award.d.ts +3 -3
- package/dist/award.js +21 -21
- package/dist/award.js.map +1 -1
- package/dist/circulars/afc-shapes.d.ts +41 -21
- package/dist/circulars/afc-shapes.js +9 -8
- package/dist/circulars/afc-shapes.js.map +1 -1
- package/dist/circulars/england-md-1-2026-r2.d.ts +13 -0
- package/dist/circulars/england-md-1-2026-r2.js +13 -0
- package/dist/circulars/england-md-1-2026-r2.js.map +1 -1
- package/dist/circulars/ni-hsc-afc-06-2025.d.ts +3 -2
- package/dist/circulars/ni-hsc-afc-06-2025.js +3 -2
- package/dist/circulars/ni-hsc-afc-06-2025.js.map +1 -1
- package/dist/circulars/ni-hsc-tc8-05-2025.d.ts +22 -0
- package/dist/circulars/ni-hsc-tc8-05-2025.js +22 -0
- package/dist/circulars/ni-hsc-tc8-05-2025.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2025-01.d.ts +20 -0
- package/dist/circulars/scotland-pcs-dd-2025-01.js +20 -0
- package/dist/circulars/scotland-pcs-dd-2025-01.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2026-01.d.ts +19 -0
- package/dist/circulars/scotland-pcs-dd-2026-01.js +30 -10
- package/dist/circulars/scotland-pcs-dd-2026-01.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2026-02.d.ts +10 -0
- package/dist/circulars/scotland-pcs-dd-2026-02.js +10 -0
- package/dist/circulars/scotland-pcs-dd-2026-02.js.map +1 -1
- package/dist/circulars/wales-mdw-01-2025.d.ts +17 -0
- package/dist/circulars/wales-mdw-01-2025.js +17 -0
- package/dist/circulars/wales-mdw-01-2025.js.map +1 -1
- package/dist/circulars/wales-mdw-01-2026.d.ts +20 -0
- package/dist/circulars/wales-mdw-01-2026.js +20 -0
- package/dist/circulars/wales-mdw-01-2026.js.map +1 -1
- package/dist/commutation.js +3 -2
- package/dist/commutation.js.map +1 -1
- package/dist/dental-grades.d.ts +25 -0
- package/dist/dental-grades.js +25 -0
- package/dist/dental-grades.js.map +1 -0
- package/dist/dental-scales.d.ts +5 -21
- package/dist/dental-scales.js +73 -72
- package/dist/dental-scales.js.map +1 -1
- package/dist/format.js +3 -2
- package/dist/format.js.map +1 -1
- package/dist/hcas-pcts.d.ts +1 -1
- package/dist/hcas-pcts.js +1 -1
- package/dist/hcas-pcts.js.map +1 -1
- package/dist/hcas-zone.d.ts +23 -0
- package/dist/hcas-zone.js +17 -0
- package/dist/hcas-zone.js.map +1 -0
- package/dist/hcas.d.ts +26 -18
- package/dist/hcas.js +45 -24
- package/dist/hcas.js.map +1 -1
- package/dist/index.d.ts +25 -16
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/medical-grades.d.ts +33 -0
- package/dist/medical-grades.js +33 -0
- package/dist/medical-grades.js.map +1 -0
- package/dist/medical-scales.d.ts +10 -33
- package/dist/medical-scales.js +104 -158
- package/dist/medical-scales.js.map +1 -1
- package/dist/member/input-period.d.ts +18 -5
- package/dist/member/input-period.js +24 -13
- package/dist/member/input-period.js.map +1 -1
- package/dist/pay-round.js +3 -3
- package/dist/pay-round.js.map +1 -1
- package/dist/pay-year.d.ts +17 -0
- package/dist/pay-year.js +20 -0
- package/dist/pay-year.js.map +1 -0
- package/dist/pension/ledger.d.ts +7 -0
- package/dist/pension/ledger.js +18 -11
- package/dist/pension/ledger.js.map +1 -1
- package/dist/pension.js +2 -1
- package/dist/pension.js.map +1 -1
- package/dist/post.d.ts +20 -21
- package/dist/post.js +54 -53
- package/dist/post.js.map +1 -1
- package/dist/published/england-afc.d.ts +72 -0
- package/dist/published/england-afc.js +86 -0
- package/dist/published/england-afc.js.map +1 -0
- package/dist/published/hcas-zones.d.ts +18 -0
- package/dist/published/hcas-zones.js +46 -0
- package/dist/published/hcas-zones.js.map +1 -0
- package/dist/published/wales-living-wage.d.ts +36 -0
- package/dist/published/wales-living-wage.js +30 -0
- package/dist/published/wales-living-wage.js.map +1 -0
- package/dist/regions.d.ts +25 -14
- package/dist/regions.js +61 -71
- package/dist/regions.js.map +1 -1
- package/dist/resolver.d.ts +46 -41
- package/dist/resolver.js +70 -142
- package/dist/resolver.js.map +1 -1
- package/dist/role.d.ts +3 -3
- package/dist/scale-point.d.ts +11 -7
- package/dist/scale-point.js +29 -1
- package/dist/scale-point.js.map +1 -1
- package/dist/scale-tables.d.ts +42 -60
- package/dist/scale-tables.js +65 -105
- package/dist/scale-tables.js.map +1 -1
- package/dist/scale-translators.d.ts +90 -0
- package/dist/scale-translators.js +97 -0
- package/dist/scale-translators.js.map +1 -0
- package/dist/scales.d.ts +164 -102
- package/dist/scales.js +242 -462
- package/dist/scales.js.map +1 -1
- package/dist/sources.d.ts +8 -12
- package/dist/sources.js +9 -15
- package/dist/sources.js.map +1 -1
- package/dist/take-home.js +1 -2
- package/dist/take-home.js.map +1 -1
- package/dist/values.d.ts +10 -3
- package/dist/values.js +11 -4
- package/dist/values.js.map +1 -1
- package/dist/working-week.d.ts +23 -8
- package/dist/working-week.js +55 -25
- package/dist/working-week.js.map +1 -1
- package/package.json +3 -3
- package/dist/bands.d.ts +0 -63
- package/dist/bands.js +0 -78
- package/dist/bands.js.map +0 -1
package/dist/afc-scales.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Translation layer: AfC
|
|
2
|
+
* Translation layer: AfC tables as printed → canonical scale points.
|
|
3
3
|
*
|
|
4
4
|
* The counterpart to `medical-scales.ts` for Agenda for Change. The
|
|
5
|
-
* verbatim transcriptions
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* layer follows is: *where the publisher issues a circular, transcribe
|
|
13
|
-
* it verbatim; where it publishes a web table, cite it and pin it with
|
|
14
|
-
* fixtures.* Inventing a pseudo-circular file for England to make the
|
|
15
|
-
* four shapes match would assert a document that does not exist, which
|
|
16
|
-
* is worse than the asymmetry.
|
|
5
|
+
* verbatim transcriptions hold each publisher's own table shape: the
|
|
6
|
+
* devolved nations' circulars in `src/circulars/*`, and England's NHS
|
|
7
|
+
* Employers page in `published/england-afc.ts`, since England publishes
|
|
8
|
+
* no AfC circular (the README's AfC pay scales rule). This module maps
|
|
9
|
+
* them to the uniform `Record<AfcBandId, SteppedPoint[]>` the rest of the
|
|
10
|
+
* library speaks, and reads each one's Band 1 beside it. `scales.ts`
|
|
11
|
+
* pairs each result with its source.
|
|
17
12
|
*
|
|
18
13
|
* ── Point labels are DERIVED here, not authored ──
|
|
19
14
|
*
|
|
@@ -30,111 +25,148 @@
|
|
|
30
25
|
* nothing to catch it; computed from the transcribed interval, a
|
|
31
26
|
* mis-read interval produces a wrong label that a fixture row fails on.
|
|
32
27
|
*/
|
|
33
|
-
import {
|
|
34
|
-
import { AFC_NI_2025, AFC_SCOTLAND, AFC_W_02_2025, AFC_W_02_2026, } from './sources.js';
|
|
28
|
+
import { YEAR_LABELS } from '@casomoltd/paye-calc';
|
|
35
29
|
import { AFC_BANDS } from './afc-band.js';
|
|
36
30
|
import { invariant } from './errors.js';
|
|
37
31
|
import { WALES_AFC_W_02_2025 } from './circulars/wales-afc-w-02-2025.js';
|
|
38
32
|
import { WALES_AFC_W_02_2026 } from './circulars/wales-afc-w-02-2026.js';
|
|
33
|
+
import { ENGLAND_AFC_2025_26, ENGLAND_AFC_2026_27, } from './published/england-afc.js';
|
|
39
34
|
import { NI_HSC_AFC_06_2025 } from './circulars/ni-hsc-afc-06-2025.js';
|
|
40
35
|
import { SCOTLAND_PCS_AFC_2026_01, } from './circulars/scotland-pcs-afc-2026-01.js';
|
|
41
36
|
/**
|
|
42
|
-
* Band 1, which every AfC
|
|
43
|
-
* not model.
|
|
37
|
+
* Band 1, which every AfC publisher still prints and this library does
|
|
38
|
+
* not model as a rung.
|
|
44
39
|
*
|
|
45
40
|
* Closed to new entrants in England, Wales and Northern Ireland, and
|
|
46
41
|
* **open in Scotland**, whose PCS(AFC)2026/1 carries no closure
|
|
47
|
-
* statement and gives it a full Annex C pay journey.
|
|
48
|
-
* to about 1,200 FTE and falling.
|
|
42
|
+
* statement and gives it a full Annex C pay journey.
|
|
49
43
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
44
|
+
* Absent from `AFC_BANDS`, so the ladder translation skips it by name
|
|
45
|
+
* here and anything else unmapped throws. That is the whole job of this
|
|
46
|
+
* list — take it away and every nation's Band 1 row fails at module
|
|
47
|
+
* load. Making it a rung shifts every index that reads the band list by
|
|
48
|
+
* position, a separate piece of work; it is reachable as each
|
|
49
|
+
* nation-year's `band1` instead.
|
|
54
50
|
*
|
|
55
|
-
*
|
|
56
|
-
* beside the ladder rather than a rung added to it. Making it a rung
|
|
57
|
-
* shifts every index that reads the band list by position, and that is
|
|
58
|
-
* a separate piece of work.
|
|
51
|
+
* Declared above the tables because their initialisation reads it.
|
|
59
52
|
*/
|
|
60
53
|
const UNMODELLED_BANDS = ['band 1'];
|
|
61
54
|
/**
|
|
62
|
-
*
|
|
55
|
+
* England's tables, read from the NHS Employers pay-scales pages,
|
|
56
|
+
* "NHS Employers — AfC pay scales 2025/26" (#sa-25) and "… 2026/27"
|
|
57
|
+
* (#sa-26), transcribed in `published/england-afc.ts`.
|
|
58
|
+
*/
|
|
59
|
+
export const ENGLAND_TABLES_2025_26 = tablesFrom(ENGLAND_AFC_2025_26, 'NHS Employers 2025/26');
|
|
60
|
+
export const ENGLAND_TABLES_2026_27 = tablesFrom(ENGLAND_AFC_2026_27, 'NHS Employers 2026/27');
|
|
61
|
+
/**
|
|
62
|
+
* Wales's own tables, read from Annex 1 of "Wales, AfC(W) 02/2025"
|
|
63
|
+
* (#sa-44) and "Wales, AfC(W) 02/2026" (#sa-45). They differ from
|
|
64
|
+
* England's at every band from 4 upward, so England's figures plus a
|
|
65
|
+
* living-wage floor reproduce neither year: the floor lifts the bottom of
|
|
66
|
+
* a ladder and cannot raise its top. Band 2 carries two points, as
|
|
67
|
+
* England's does.
|
|
68
|
+
*/
|
|
69
|
+
export const WALES_TABLES_2025_26 = tablesFrom(WALES_AFC_W_02_2025, 'AfC(W) 02/2025');
|
|
70
|
+
export const WALES_TABLES_2026_27 = tablesFrom(WALES_AFC_W_02_2026, 'AfC(W) 02/2026');
|
|
71
|
+
/**
|
|
72
|
+
* Northern Ireland's tables, from HSC (AfC) 06/2025 (3 December 2025,
|
|
73
|
+
* effective 1 April 2025). One year only: the circular's header says why
|
|
74
|
+
* NI has no 2026-27 round.
|
|
63
75
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
76
|
+
* The figures are England's for every band, because NI's circular prints
|
|
77
|
+
* the same numbers. They are read from NI's circular, not England's table,
|
|
78
|
+
* so they coincide as a fact about the two documents and NI can diverge
|
|
79
|
+
* without a code change. Its Basic Pay block prints Bands 1 and 2 as
|
|
80
|
+
* single flat figures and starts its entry/interval/top table at Band 3,
|
|
81
|
+
* so Band 2 is ONE point where England's is two.
|
|
68
82
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* document it claims to quote.
|
|
83
|
+
* All 29 values are pinned against the circular in
|
|
84
|
+
* `tests/fixtures/pay-scales.csv`.
|
|
72
85
|
*/
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// Band 1 means deciding that separately.
|
|
83
|
-
[NATION_KEYS.england]: [],
|
|
84
|
-
[NATION_KEYS.wales]: [
|
|
85
|
-
band1Of(WALES_AFC_W_02_2025.flatBands, payYear(TAX_YEARS.Y2025_26), AFC_W_02_2025, 'AfC(W) 02/2025'),
|
|
86
|
-
band1Of(WALES_AFC_W_02_2026.flatBands, payYear(TAX_YEARS.Y2026_27), AFC_W_02_2026, 'AfC(W) 02/2026'),
|
|
87
|
-
],
|
|
88
|
-
[NATION_KEYS.northernIreland]: [
|
|
89
|
-
band1Of(NI_HSC_AFC_06_2025.flatBands, payYear(TAX_YEARS.Y2025_26), AFC_NI_2025, 'HSC (AfC) 06/2025'),
|
|
90
|
-
],
|
|
91
|
-
// Scotland is the exception the whole accessor exists for: its
|
|
92
|
-
// PCS(AFC)2026/1 carries no closure statement for Band 1 and gives it
|
|
93
|
-
// a full Annex C pay journey, so it is a band people are hired onto.
|
|
94
|
-
[NATION_KEYS.scotland]: [
|
|
95
|
-
band1FromAnnexB(SCOTLAND_PCS_AFC_2026_01.annexB2025, payYear(TAX_YEARS.Y2025_26)),
|
|
96
|
-
band1FromAnnexB(SCOTLAND_PCS_AFC_2026_01.annexB2026, payYear(TAX_YEARS.Y2026_27)),
|
|
97
|
-
],
|
|
86
|
+
export const NI_TABLES_2025_26 = tablesFrom(NI_HSC_AFC_06_2025, 'HSC (AfC) 06/2025');
|
|
87
|
+
/**
|
|
88
|
+
* Scotland's Annex B by year: the salaries against bare point numbers.
|
|
89
|
+
* It gives each year's Band 1, and 2025-26's salaries; only Annex C
|
|
90
|
+
* carries the year of service a label needs.
|
|
91
|
+
*/
|
|
92
|
+
const SCOTLAND_ANNEX_B = {
|
|
93
|
+
[YEAR_LABELS.Y2025_26]: SCOTLAND_PCS_AFC_2026_01.annexB2025,
|
|
94
|
+
[YEAR_LABELS.Y2026_27]: SCOTLAND_PCS_AFC_2026_01.annexB2026,
|
|
98
95
|
};
|
|
99
|
-
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Scotland 2026-27, from Annex C: 3.75% on the revised 2025-26 base, so
|
|
98
|
+
* the inflation guarantee reaches this year too. Source: "Scotland,
|
|
99
|
+
* PCS(AFC)2026/1" (#sa-13), effective 1 April 2026.
|
|
100
|
+
*
|
|
101
|
+
* Annex C rather than Annex B because only Annex C carries the year of
|
|
102
|
+
* service. Annex B gives the same salaries against a bare point number,
|
|
103
|
+
* which cannot produce a label — `scotlandAnnexB` exists so a fixture
|
|
104
|
+
* can check the two annexes agree.
|
|
105
|
+
*/
|
|
106
|
+
export const SCOTLAND_TABLES_2026_27 = {
|
|
107
|
+
scales: scotlandScales(SCOTLAND_PCS_AFC_2026_01.payJourney2026),
|
|
108
|
+
band1: band1Of(SCOTLAND_ANNEX_B[YEAR_LABELS.Y2026_27], 'PCS(AFC)2026/1 Annex B 2026-27'),
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Scotland 2025-26. Scotland negotiates its own award: the 2025-26
|
|
112
|
+
* settlement was 4.25% with an inflation guarantee of at least one point
|
|
113
|
+
* above the calendar year's average CPI. 2025 CPI confirmed at 3.4%, so
|
|
114
|
+
* the rate became 4.4%, backdated to 1 April 2025. Source: "Scotland,
|
|
115
|
+
* PCS(AFC)2026/1" (#sa-13), Annex B, the revised 4.4% column.
|
|
116
|
+
*
|
|
117
|
+
* Built from the 2026-27 journey's SHAPE with Annex B's 2025-26
|
|
118
|
+
* salaries: the circular prints an identical increment structure for
|
|
119
|
+
* both years — the settlement changed the rates, not the ladder — and
|
|
120
|
+
* Annex C's 2025-26 table restates that structure rather than adding
|
|
121
|
+
* to it. Building the year from Annex B against a shape the circular
|
|
122
|
+
* publishes twice is faithful; re-typing the same increments would
|
|
123
|
+
* only add a second place to mistype them.
|
|
124
|
+
*/
|
|
125
|
+
export const SCOTLAND_TABLES_2025_26 = {
|
|
126
|
+
scales: withAnnexBSalaries(SCOTLAND_TABLES_2026_27.scales, scotlandAnnexB(YEAR_LABELS.Y2025_26)),
|
|
127
|
+
band1: band1Of(SCOTLAND_ANNEX_B[YEAR_LABELS.Y2025_26], 'PCS(AFC)2026/1 Annex B 2025-26'),
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Annex B's salaries for a year, keyed by band, in printed order.
|
|
131
|
+
*
|
|
132
|
+
* Exposed so a test can assert that the annex a label came from and
|
|
133
|
+
* the annex the salaries were published in agree. Two annexes of one
|
|
134
|
+
* circular disagreeing would mean a transcription error in one of
|
|
135
|
+
* them, and nothing else would notice.
|
|
136
|
+
*/
|
|
137
|
+
export function scotlandAnnexB(year) {
|
|
138
|
+
const out = new Map();
|
|
139
|
+
for (const [id, rows] of rowsByBand(SCOTLAND_ANNEX_B[year])) {
|
|
140
|
+
out.set(id, rows.map((row) => row.salary));
|
|
141
|
+
}
|
|
142
|
+
return out;
|
|
143
|
+
}
|
|
144
|
+
/** A publisher's tables in the shared shape → its ladder and Band 1.
|
|
145
|
+
* `which` names the document in an error. */
|
|
146
|
+
function tablesFrom(printed, which) {
|
|
106
147
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
...(row.note !== undefined ? { note: row.note } : {}),
|
|
110
|
-
source,
|
|
148
|
+
scales: scalesFrom(printed),
|
|
149
|
+
band1: band1Of(printed.flatBands, which),
|
|
111
150
|
};
|
|
112
151
|
}
|
|
113
|
-
/** Band 1 from Scotland's Annex B, which prints one row per point. The
|
|
114
|
-
* count is asserted rather than the first match taken: Band 1 has one
|
|
115
|
-
* point today, and a circular giving it two would otherwise return
|
|
116
|
-
* point 1 silently while a consumer says entry and top are the same. */
|
|
117
|
-
function band1FromAnnexB(rows, year) {
|
|
118
|
-
const found = rows.filter((r) => r.band === 'Band 1');
|
|
119
|
-
invariant(found.length === 1, `afcBand1: Scotland's ${year} Annex B prints ${found.length} `
|
|
120
|
-
+ 'Band 1 rows, expected 1');
|
|
121
|
-
return { year, salary: found[0].salary, source: AFC_SCOTLAND };
|
|
122
|
-
}
|
|
123
152
|
/**
|
|
124
|
-
* Band 1
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* added to it.
|
|
153
|
+
* Band 1 from the rows a publisher prints it in: the flat-band table,
|
|
154
|
+
* above the stepped one, for the three nations that close it, and
|
|
155
|
+
* Annex B for Scotland. The count is asserted rather than the first
|
|
156
|
+
* match taken: Band 1 has one point today, and a table giving it two
|
|
157
|
+
* would otherwise return point 1 silently while a consumer says entry
|
|
158
|
+
* and top are the same.
|
|
131
159
|
*/
|
|
132
|
-
|
|
133
|
-
const found =
|
|
134
|
-
|
|
160
|
+
function band1Of(rows, which) {
|
|
161
|
+
const found = rows.filter((r) => r.band === 'Band 1');
|
|
162
|
+
invariant(found.length === 1, `afc-scales: ${which} prints ${found.length} Band 1 rows, expected 1`);
|
|
163
|
+
const [row] = found;
|
|
164
|
+
return row.note === undefined
|
|
165
|
+
? { salary: row.salary }
|
|
166
|
+
: { salary: row.salary, note: row.note };
|
|
135
167
|
}
|
|
136
168
|
/**
|
|
137
|
-
* A band as a
|
|
169
|
+
* A band as a publisher prints it → the id this library uses, or `null`
|
|
138
170
|
* where the band is deliberately not modelled.
|
|
139
171
|
*
|
|
140
172
|
* Case and spacing differ by publisher — Scotland prints `Band 8A`
|
|
@@ -152,13 +184,25 @@ function bandIdOf(printed) {
|
|
|
152
184
|
invariant(id !== undefined, `afc-scales: no band id for the printed band "${printed}"`);
|
|
153
185
|
return id;
|
|
154
186
|
}
|
|
187
|
+
/** A publisher's rows grouped by the band they print, in printed order,
|
|
188
|
+
* with the unmodelled bands left out. */
|
|
189
|
+
function rowsByBand(rows) {
|
|
190
|
+
const out = new Map();
|
|
191
|
+
for (const row of rows) {
|
|
192
|
+
const id = bandIdOf(row.band);
|
|
193
|
+
if (id) {
|
|
194
|
+
out.set(id, [...(out.get(id) ?? []), row]);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return out;
|
|
198
|
+
}
|
|
155
199
|
/**
|
|
156
200
|
* An Agenda for Change point from the year of service it is first
|
|
157
201
|
* reached in: the label every nation's scale prints, and the same year
|
|
158
202
|
* as a number, so a reader that needs the timing never has to parse it
|
|
159
203
|
* back out of the label. The one producer of both, for all four nations.
|
|
160
204
|
*/
|
|
161
|
-
|
|
205
|
+
function afcPoint(year, isTop, salary) {
|
|
162
206
|
return {
|
|
163
207
|
label: isTop ? `Year ${year}+` : `Year ${year}`,
|
|
164
208
|
salary,
|
|
@@ -172,21 +216,18 @@ export function afcPoint(year, isTop, salary) {
|
|
|
172
216
|
* the printed interval, so its year is the running total plus one.
|
|
173
217
|
*/
|
|
174
218
|
function pointsFromStepped(row) {
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
invariant(row.yearsToTop !== undefined, `afc-scales: ${row.band} prints an intermediate step with no `
|
|
182
|
-
+ 'interval to the top');
|
|
183
|
-
year += row.yearsToTop;
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
year += row.yearsToNext;
|
|
219
|
+
const nextYear = 1 + row.yearsToNext;
|
|
220
|
+
if (row.intermediate === undefined) {
|
|
221
|
+
return [
|
|
222
|
+
afcPoint(1, false, row.entry),
|
|
223
|
+
afcPoint(nextYear, true, row.top),
|
|
224
|
+
];
|
|
187
225
|
}
|
|
188
|
-
|
|
189
|
-
|
|
226
|
+
return [
|
|
227
|
+
afcPoint(1, false, row.entry),
|
|
228
|
+
afcPoint(nextYear, false, row.intermediate),
|
|
229
|
+
afcPoint(nextYear + row.yearsToTop, true, row.top),
|
|
230
|
+
];
|
|
190
231
|
}
|
|
191
232
|
/** A flat row → its single point. */
|
|
192
233
|
function pointsFromFlat(row) {
|
|
@@ -204,7 +245,7 @@ function pointsFromFlat(row) {
|
|
|
204
245
|
function pointsFromJourney(rows) {
|
|
205
246
|
const runs = [];
|
|
206
247
|
for (const row of rows) {
|
|
207
|
-
const last = runs
|
|
248
|
+
const last = runs.at(-1);
|
|
208
249
|
if (!last || last.salary !== row.salary) {
|
|
209
250
|
runs.push({ year: row.increment, salary: row.salary });
|
|
210
251
|
}
|
|
@@ -212,16 +253,16 @@ function pointsFromJourney(rows) {
|
|
|
212
253
|
invariant(runs.length > 0, 'afc-scales: a pay journey with no increments');
|
|
213
254
|
return runs.map((run, i) => afcPoint(run.year, i === runs.length - 1, run.salary));
|
|
214
255
|
}
|
|
215
|
-
/** Every band a
|
|
216
|
-
function scalesFrom(
|
|
256
|
+
/** Every band a publisher prints in the shared shape, keyed by id. */
|
|
257
|
+
function scalesFrom(printed) {
|
|
217
258
|
const out = {};
|
|
218
|
-
for (const row of
|
|
259
|
+
for (const row of printed.flatBands) {
|
|
219
260
|
const id = bandIdOf(row.band);
|
|
220
261
|
if (id) {
|
|
221
262
|
out[id] = pointsFromFlat(row);
|
|
222
263
|
}
|
|
223
264
|
}
|
|
224
|
-
for (const row of
|
|
265
|
+
for (const row of printed.steppedBands) {
|
|
225
266
|
const id = bandIdOf(row.band);
|
|
226
267
|
if (id) {
|
|
227
268
|
out[id] = pointsFromStepped(row);
|
|
@@ -232,10 +273,10 @@ function scalesFrom(flat, stepped) {
|
|
|
232
273
|
/**
|
|
233
274
|
* Every band must be present.
|
|
234
275
|
*
|
|
235
|
-
* A
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
276
|
+
* A table that omits one is either a transcription that stopped early
|
|
277
|
+
* or a genuine change in what the nation publishes, and both need a
|
|
278
|
+
* person to look. Failing here beats serving a band page with nothing
|
|
279
|
+
* on it.
|
|
239
280
|
*/
|
|
240
281
|
function assertEveryBand(out) {
|
|
241
282
|
for (const band of Object.values(AFC_BANDS)) {
|
|
@@ -245,80 +286,23 @@ function assertEveryBand(out) {
|
|
|
245
286
|
}
|
|
246
287
|
/** Scotland's bands, from the Annex C pay journey. */
|
|
247
288
|
function scotlandScales(journey) {
|
|
248
|
-
const byBand = new Map();
|
|
249
|
-
for (const row of journey) {
|
|
250
|
-
const id = bandIdOf(row.band);
|
|
251
|
-
if (!id) {
|
|
252
|
-
continue;
|
|
253
|
-
}
|
|
254
|
-
const rows = byBand.get(id) ?? [];
|
|
255
|
-
rows.push(row);
|
|
256
|
-
byBand.set(id, rows);
|
|
257
|
-
}
|
|
258
289
|
const out = {};
|
|
259
|
-
for (const [id, rows] of
|
|
290
|
+
for (const [id, rows] of rowsByBand(journey)) {
|
|
260
291
|
out[id] = pointsFromJourney(rows);
|
|
261
292
|
}
|
|
262
293
|
return assertEveryBand(out);
|
|
263
294
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Scotland 2026-27, from Annex C.
|
|
269
|
-
*
|
|
270
|
-
* Annex C rather than Annex B because only Annex C carries the year of
|
|
271
|
-
* service. Annex B gives the same salaries against a bare point
|
|
272
|
-
* number, which cannot produce a label — `scotlandAnnexB` below exists
|
|
273
|
-
* so a fixture can check the two annexes agree.
|
|
274
|
-
*/
|
|
275
|
-
export const SCOTLAND_SCALES_2026_27 = scotlandScales(SCOTLAND_PCS_AFC_2026_01.payJourney2026);
|
|
276
|
-
/**
|
|
277
|
-
* Annex B's salaries for a year, keyed by band, in printed order.
|
|
278
|
-
*
|
|
279
|
-
* Exposed so a test can assert that the annex a label came from and
|
|
280
|
-
* the annex the salaries were published in agree. Two annexes of one
|
|
281
|
-
* circular disagreeing would mean a transcription error in one of
|
|
282
|
-
* them, and nothing else would notice.
|
|
283
|
-
*/
|
|
284
|
-
export function scotlandAnnexB(year) {
|
|
285
|
-
const rows = year === '2025-26'
|
|
286
|
-
? SCOTLAND_PCS_AFC_2026_01.annexB2025
|
|
287
|
-
: SCOTLAND_PCS_AFC_2026_01.annexB2026;
|
|
288
|
-
const out = new Map();
|
|
289
|
-
for (const row of rows) {
|
|
290
|
-
const id = bandIdOf(row.band);
|
|
291
|
-
if (!id) {
|
|
292
|
-
continue;
|
|
293
|
-
}
|
|
294
|
-
out.set(id, [...(out.get(id) ?? []), row.salary]);
|
|
295
|
-
}
|
|
296
|
-
return out;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Scotland 2025-26.
|
|
300
|
-
*
|
|
301
|
-
* Built from the 2026-27 journey's SHAPE with Annex B's 2025-26
|
|
302
|
-
* salaries: the circular prints an identical increment structure for
|
|
303
|
-
* both years — the settlement changed the rates, not the ladder — and
|
|
304
|
-
* Annex C's 2025-26 table restates that structure rather than adding
|
|
305
|
-
* to it. Building the year from Annex B against a shape the circular
|
|
306
|
-
* publishes twice is faithful; re-typing the same increments would
|
|
307
|
-
* only add a second place to mistype them.
|
|
308
|
-
*/
|
|
309
|
-
export const SCOTLAND_SCALES_2025_26 = (() => {
|
|
310
|
-
const salaries = scotlandAnnexB('2025-26');
|
|
295
|
+
/** Scotland's 2026-27 ladder carrying Annex B 2025-26's salaries: the
|
|
296
|
+
* same points, each with that year's salary at its position. */
|
|
297
|
+
function withAnnexBSalaries(shape, salaries) {
|
|
311
298
|
const out = {};
|
|
312
|
-
for (const [band, points] of Object.entries(
|
|
299
|
+
for (const [band, points] of Object.entries(shape)) {
|
|
313
300
|
const yearSalaries = salaries.get(band);
|
|
314
|
-
invariant(yearSalaries !== undefined
|
|
315
|
-
&& yearSalaries.length === points.length, `afc-scales: Scotland ${band} has ${points.length} points in `
|
|
301
|
+
invariant(yearSalaries !== undefined && yearSalaries.length === points.length, `afc-scales: Scotland ${band} has ${points.length} points in `
|
|
316
302
|
+ `Annex C but ${yearSalaries?.length ?? 0} in Annex B 2025-26`);
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
salary: yearSalaries[i],
|
|
320
|
-
}));
|
|
303
|
+
// The lengths are pinned equal above, so every point has its salary.
|
|
304
|
+
out[band] = points.map((point, i) => ({ ...point, salary: yearSalaries[i] }));
|
|
321
305
|
}
|
|
322
306
|
return assertEveryBand(out);
|
|
323
|
-
}
|
|
307
|
+
}
|
|
324
308
|
//# sourceMappingURL=afc-scales.js.map
|
package/dist/afc-scales.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"afc-scales.js","sourceRoot":"","sources":["../src/afc-scales.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"afc-scales.js","sourceRoot":"","sources":["../src/afc-scales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAOtC,OAAO,EAAC,mBAAmB,EAAC,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAC,mBAAmB,EAAC,MAAM,oCAAoC,CAAC;AACvE,OAAO,EACL,mBAAmB,EAAE,mBAAmB,GACzC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,kBAAkB,EAAC,MAAM,mCAAmC,CAAC;AACrE,OAAO,EACL,wBAAwB,GACzB,MAAM,yCAAyC,CAAC;AAoBjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,gBAAgB,GAAsB,CAAC,QAAQ,CAAC,CAAC;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GACjC,UAAU,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GACjC,UAAU,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B,UAAU,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,oBAAoB,GAC/B,UAAU,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC5B,UAAU,CAAC,kBAAkB,EAAE,mBAA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AAa;cAC5D,eAAe,YAAY,EAAE,MAAM,IAAI,CAAC,qBAAqB,CAChE,CAAC;QACF,qEAAqE;QACrE,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist/allowances.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import { payYear } from '@casomoltd/paye-calc';
|
|
31
31
|
import { isoDate } from './iso-date.js';
|
|
32
|
-
import { NATION_KEYS,
|
|
32
|
+
import { NATION_KEYS, YEAR_LABELS } from '@casomoltd/paye-calc';
|
|
33
33
|
import { AFC_NI_2025, AFC_SCOTLAND, AFC_W_02_2025, AFC_W_02_2026, } from './sources.js';
|
|
34
34
|
import { NI_HSC_AFC_06_2025, } from './circulars/ni-hsc-afc-06-2025.js';
|
|
35
35
|
import { invariant } from './errors.js';
|
|
@@ -112,7 +112,7 @@ const RATES = [
|
|
|
112
112
|
{
|
|
113
113
|
id: SESSION_ALLOWANCES.scotlandOnCallAvailability,
|
|
114
114
|
label: 'On-call availability allowance',
|
|
115
|
-
year: payYear(
|
|
115
|
+
year: payYear(YEAR_LABELS.Y2025_26),
|
|
116
116
|
perSession: 26.51,
|
|
117
117
|
effectiveFrom: isoDate('2025-04-01'),
|
|
118
118
|
source: AFC_SCOTLAND,
|
|
@@ -120,7 +120,7 @@ const RATES = [
|
|
|
120
120
|
{
|
|
121
121
|
id: SESSION_ALLOWANCES.scotlandOnCallAvailability,
|
|
122
122
|
label: 'On-call availability allowance',
|
|
123
|
-
year: payYear(
|
|
123
|
+
year: payYear(YEAR_LABELS.Y2026_27),
|
|
124
124
|
perSession: 27.51,
|
|
125
125
|
effectiveFrom: isoDate('2026-04-01'),
|
|
126
126
|
source: AFC_SCOTLAND,
|
|
@@ -132,7 +132,7 @@ const RATES = [
|
|
|
132
132
|
{
|
|
133
133
|
id: SESSION_ALLOWANCES.walesSleepingIn,
|
|
134
134
|
label: 'Sleeping in',
|
|
135
|
-
year: payYear(
|
|
135
|
+
year: payYear(YEAR_LABELS.Y2025_26),
|
|
136
136
|
perSession: 43.38,
|
|
137
137
|
effectiveFrom: isoDate('2025-04-01'),
|
|
138
138
|
source: AFC_W_02_2025,
|
|
@@ -140,7 +140,7 @@ const RATES = [
|
|
|
140
140
|
{
|
|
141
141
|
id: SESSION_ALLOWANCES.walesOnCallWeekday,
|
|
142
142
|
label: 'On call, weekday or weekend',
|
|
143
|
-
year: payYear(
|
|
143
|
+
year: payYear(YEAR_LABELS.Y2025_26),
|
|
144
144
|
perSession: 25.21,
|
|
145
145
|
effectiveFrom: isoDate('2025-04-01'),
|
|
146
146
|
source: AFC_W_02_2025,
|
|
@@ -148,7 +148,7 @@ const RATES = [
|
|
|
148
148
|
{
|
|
149
149
|
id: SESSION_ALLOWANCES.walesOnCallPublicHoliday,
|
|
150
150
|
label: 'On call, public holiday',
|
|
151
|
-
year: payYear(
|
|
151
|
+
year: payYear(YEAR_LABELS.Y2025_26),
|
|
152
152
|
perSession: 50.41,
|
|
153
153
|
effectiveFrom: isoDate('2025-04-01'),
|
|
154
154
|
source: AFC_W_02_2025,
|
|
@@ -156,7 +156,7 @@ const RATES = [
|
|
|
156
156
|
{
|
|
157
157
|
id: SESSION_ALLOWANCES.walesSleepingIn,
|
|
158
158
|
label: 'Sleeping in',
|
|
159
|
-
year: payYear(
|
|
159
|
+
year: payYear(YEAR_LABELS.Y2026_27),
|
|
160
160
|
perSession: 44.82,
|
|
161
161
|
effectiveFrom: isoDate('2026-04-01'),
|
|
162
162
|
source: AFC_W_02_2026,
|
|
@@ -164,7 +164,7 @@ const RATES = [
|
|
|
164
164
|
{
|
|
165
165
|
id: SESSION_ALLOWANCES.walesOnCallWeekday,
|
|
166
166
|
label: 'On call, weekday or weekend',
|
|
167
|
-
year: payYear(
|
|
167
|
+
year: payYear(YEAR_LABELS.Y2026_27),
|
|
168
168
|
perSession: 26.05,
|
|
169
169
|
effectiveFrom: isoDate('2026-04-01'),
|
|
170
170
|
source: AFC_W_02_2026,
|
|
@@ -172,7 +172,7 @@ const RATES = [
|
|
|
172
172
|
{
|
|
173
173
|
id: SESSION_ALLOWANCES.walesOnCallPublicHoliday,
|
|
174
174
|
label: 'On call, public holiday',
|
|
175
|
-
year: payYear(
|
|
175
|
+
year: payYear(YEAR_LABELS.Y2026_27),
|
|
176
176
|
perSession: 52.08,
|
|
177
177
|
effectiveFrom: isoDate('2026-04-01'),
|
|
178
178
|
source: AFC_W_02_2026,
|
|
@@ -185,7 +185,7 @@ const RATES = [
|
|
|
185
185
|
{
|
|
186
186
|
id: SESSION_ALLOWANCES.niSleepIn,
|
|
187
187
|
label: 'Sleeping in',
|
|
188
|
-
year: payYear(
|
|
188
|
+
year: payYear(YEAR_LABELS.Y2025_26),
|
|
189
189
|
perSession: NI_HSC_AFC_06_2025.allowances.sleepIn,
|
|
190
190
|
effectiveFrom: isoDate('2025-04-01'),
|
|
191
191
|
source: AFC_NI_2025,
|
|
@@ -193,7 +193,7 @@ const RATES = [
|
|
|
193
193
|
{
|
|
194
194
|
id: SESSION_ALLOWANCES.niOnCall,
|
|
195
195
|
label: 'On call',
|
|
196
|
-
year: payYear(
|
|
196
|
+
year: payYear(YEAR_LABELS.Y2025_26),
|
|
197
197
|
perSession: NI_HSC_AFC_06_2025.allowances.onCall,
|
|
198
198
|
effectiveFrom: isoDate('2025-04-01'),
|
|
199
199
|
source: AFC_NI_2025,
|
package/dist/allowances.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowances.js","sourceRoot":"","sources":["../src/allowances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;A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;IAEb,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CACrB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CACtC,CAAC;IACF,OAAO,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/award.d.ts
CHANGED
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
import type { Nation, PayYear } from '@casomoltd/paye-calc';
|
|
40
40
|
import type { IsoDate, IsoMonth } from './iso-date.js';
|
|
41
41
|
import { DocumentSource } from './document-source.js';
|
|
42
|
-
import type { AfcBandId } from './
|
|
43
|
-
import type { MedicalGradeId } from './medical-
|
|
44
|
-
import type { DentalGradeId } from './dental-
|
|
42
|
+
import type { AfcBandId } from './afc-band.js';
|
|
43
|
+
import type { MedicalGradeId } from './medical-grades.js';
|
|
44
|
+
import type { DentalGradeId } from './dental-grades.js';
|
|
45
45
|
/**
|
|
46
46
|
* Every identifier that names a pay scale, across both frameworks —
|
|
47
47
|
* 11 AfC bands, 22 medical grades, 13 dental. The three sets are
|