Dropdown and Custom selection for Section field #116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #91
What was changed?
Changed default input field type in sections field to select options with first, last and custom as options. and data field in onSubmit and fetchDocumentPreview the sections is changed to so that objects is converted to array and match the backend data fields
Why was it changed?
#91 issue is to have a dropdown feature for sections field with first, last and custom as options. whereas first gives section 1 data, last gives last sections data and custom is similar to earlier input field where we can give 1,2,3... or range of values (1-5) .
How was it changed?
*files that I changed: in client-app->src->components->(DraftOrcaDashboard.js and OrcaDashboardComponents.js) files.
exact sections and lines of code where I changed:
in DraftOrcaDashboard.js:
onSubmit and fetchDocumentPreview part
const data = {}
lines changed: 100 - 107 and 175 - 182
and
Number of sections?
from single input filed to dropdown options first, last and custom (when custom selected new input field to enter sections will be created.
lines changed: 270 - 302)
same changes are made in OrcaDashboardComponent.js file
onSubmit and fetchDocumentPreview lines changed: 40 - 53; 80 - 93
Number of sections? lines changed: 150 - 183*
Screenshots that show the changes (if applicable):