Skip to content

Commit

Permalink
minor(cb2-13894): add month of manufacture to TRLs (#182)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
naathanbrown and github-actions[bot] authored Oct 29, 2024
1 parent 9087e9a commit 3248eb2
Show file tree
Hide file tree
Showing 24 changed files with 319 additions and 4 deletions.
18 changes: 18 additions & 0 deletions json-definitions/v3/tech-record/enums/manufactureMonth.ignore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"title": "Months",
"type": "string",
"enum": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
]
}
10 changes: 10 additions & 0 deletions json-definitions/v3/tech-record/get/trl/complete/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,16 @@
"type": "string",
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"$ref": "../../../enums/manufactureMonth.ignore.json"
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
10 changes: 10 additions & 0 deletions json-definitions/v3/tech-record/get/trl/skeleton/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,16 @@
],
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"$ref": "../../../enums/manufactureMonth.ignore.json"
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
10 changes: 10 additions & 0 deletions json-definitions/v3/tech-record/get/trl/testable/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,16 @@
],
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"$ref": "../../../enums/manufactureMonth.ignore.json"
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
10 changes: 10 additions & 0 deletions json-definitions/v3/tech-record/put/trl/complete/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,16 @@
"type": "string",
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"$ref": "../../../enums/manufactureMonth.ignore.json"
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
10 changes: 10 additions & 0 deletions json-definitions/v3/tech-record/put/trl/skeleton/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,16 @@
],
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"$ref": "../../../enums/manufactureMonth.ignore.json"
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
10 changes: 10 additions & 0 deletions json-definitions/v3/tech-record/put/trl/testable/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,16 @@
],
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"$ref": "../../../enums/manufactureMonth.ignore.json"
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
25 changes: 25 additions & 0 deletions json-schemas/v3/tech-record/get/trl/complete/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,31 @@
"type": "string",
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"title": "Months",
"type": "string",
"enum": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
]
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
25 changes: 25 additions & 0 deletions json-schemas/v3/tech-record/get/trl/skeleton/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,31 @@
],
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"title": "Months",
"type": "string",
"enum": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
]
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
25 changes: 25 additions & 0 deletions json-schemas/v3/tech-record/get/trl/testable/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,31 @@
],
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"title": "Months",
"type": "string",
"enum": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
]
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
25 changes: 25 additions & 0 deletions json-schemas/v3/tech-record/put/trl/complete/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,31 @@
"type": "string",
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"title": "Months",
"type": "string",
"enum": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
]
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
25 changes: 25 additions & 0 deletions json-schemas/v3/tech-record/put/trl/skeleton/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,31 @@
],
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"title": "Months",
"type": "string",
"enum": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
]
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
25 changes: 25 additions & 0 deletions json-schemas/v3/tech-record/put/trl/testable/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,31 @@
],
"maxLength": 50
},
"techRecord_manufactureMonth": {
"anyOf": [
{
"title": "Months",
"type": "string",
"enum": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
]
},
{
"type": "null"
}
]
},
"techRecord_manufactureYear": {
"anyOf": [
{
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dvsa/cvs-type-definitions",
"version": "7.5.1",
"version": "7.6.0",
"description": "type definitions for cvs vta and vtm applications",
"main": "index.js",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions tests/resources/data/trlComplete.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"techRecord_loadSensingValve": false,
"techRecord_make": "Isuzu",
"techRecord_manufactureYear": 2018,
"techRecord_manufactureMonth": "January",
"techRecord_maxLoadOnCoupling": 7000,
"techRecord_model": "F06",
"techRecord_noOfAxles": 2,
Expand Down
3 changes: 2 additions & 1 deletion tests/resources/data/trlSkeleton.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"techRecord_letterOfAuth": null,
"techRecord_make": "A PL",
"techRecord_manufactureYear": null,
"techRecord_manufactureMonth": null,
"techRecord_manufacturerDetails": null,
"techRecord_maxLoadOnCoupling": null,
"techRecord_microfilm_microfilmDocumentType": "Tempo 100 Sp Ord",
Expand Down Expand Up @@ -202,4 +203,4 @@
"trailerId": "C530005",
"vin": "9080977997"
}
]
]
1 change: 1 addition & 0 deletions tests/resources/data/trlTestable.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"techRecord_lastUpdatedAt": null,
"techRecord_make": null,
"techRecord_manufactureYear": 2021,
"techRecord_manufactureMonth": "April",
"techRecord_maxTrainDesignWeight": 0,
"techRecord_maxTrainGbWeight": 0,
"techRecord_model": "model1",
Expand Down
14 changes: 14 additions & 0 deletions types/v3/tech-record/get/trl/complete/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ export type FrameDescription =
| "U section";
export type LetterTypes = "trailer acceptance" | "trailer rejection";
export type ParagraphIds = 3 | 4 | 5 | 6 | 7;
export type Months =
| "January"
| "February"
| "March"
| "April"
| "May"
| "June"
| "July"
| "August"
| "September"
| "October"
| "November"
| "December";
export type MicrofilmDocumentType =
| "PSV Miscellaneous"
| "AAT - Trailer Annual Test"
Expand Down Expand Up @@ -194,6 +207,7 @@ export interface TechRecordGETTRLComplete {
techRecord_letterOfAuth_paragraphId?: null | ParagraphIds;
techRecord_letterOfAuth_letterIssuer?: string | null;
techRecord_make: string;
techRecord_manufactureMonth?: Months | null;
techRecord_manufactureYear?: number | null;
techRecord_manufacturerDetails?: string | null;
techRecord_maxLoadOnCoupling: number;
Expand Down
Loading

0 comments on commit 3248eb2

Please sign in to comment.