Browse Source

Add info to readme

pull/23/head
baarkerlounger 3 years ago
parent
commit
b17253c5af
  1. 54
      README.md

54
README.md

@ -39,3 +39,57 @@ Note docker-compose runs the production docker image (RAILS_ENV=production) as t
### Infrastructure
The cloud infrastructure running this application is set up using the [infrastructure repository](https://github.com/communitiesuk/mhclg-data-collection-beta-infrastructure)
### Single log submission
The form for this is driven by a json file in `/config/forms/{start_year}_{end_year}.json`
The JSON should follow the structure:
```
{
form_type: [lettings/sales]
start_year: yyyy
end_year: yyyy
sections: {
snake case section name string: {
label: string,
subsections: {
snake case subsection name string: {
label: string,
pages: {
snake case page name string: {
header: string,
description: string,
questions: {
snake case question name string: {
header: string,
hint_text: string,
type: [text / numeric / radio / select ],
min: integer, (numeric only),
max: integer, (numeric only),
step: integer (numeric only),
answer_options: { (select and radio only)
"0": string,
"1": string
}
}
}
}
}
}
}
}
}
}
```
Assumptions made by the format:
- All forms have at least 1 section
- All sections have at least 1 subsection
- All subsections have at least 1 page
- All pages have at least 1 question
- The ActiveRecord case log model has a field for each question name (must match)
- Text not required by a page/question such as a header or hint text should be passed as an empty string

Loading…
Cancel
Save