Skip to content

Commit

Permalink
nitpick: fixed a spcouple of quick slling io& de-style issue /s + ain…
Browse files Browse the repository at this point in the history
…or change to the Survey.yearQuarter format
  • Loading branch information
jtfairbank committed Nov 27, 2024
1 parent 09cb1b0 commit 9bcf504
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions src/api/needs-assessment/content-types/survey/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@
},
"quarter": {
"type": "enumeration",
"enum": [
"Q1",
"Q2",
"Q3",
"Q4"
],
"enum": ["Q1", "Q2", "Q3", "Q4"],
"required": true
},
"needs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe("processSurvey", () => {
const expected = {
year: "2024",
quarter: "Q1",
yearQuearter: "2024 - Q1",
yearQuarter: "2024-Q1",
needs: {},
};
const actual = processSurvey(survey);
Expand Down
2 changes: 1 addition & 1 deletion src/functions/content-types/needs-assessment/survey.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function processSurvey(data: { year: string; quarter: string }) {
return {
...data,
yearQuarter: `${data.year} - ${data.quarter}`,
yearQuarter: `${data.year}-${data.quarter}`,
};
}

0 comments on commit 9bcf504

Please sign in to comment.