Simulation application
- React - JS Library for UI
- Redux - A state container for JS apps
- Sass - CSS Style preprocessor
- Webpack - Module bundler
Make sure you have installed
- NodeJS >= 8.10
- Yarn v1.9.4
Open project and run in terminal:
- Default PORT used - 9000;
- Access website on http://localhost:9000
- Install command:
yarn install
yarn start
- Note: Port can be changed on webpack.config.babel.js file. Please find below more information how to change it:
devConfig: {
devServer: {
port: CUSTOM_PORT
}
}
Open project and run in terminal:
yarn install
yarn build
- Homepage with Spreadsheet Creation
- Basic Routing
- Column creation with title, type and required check functionalities
- Main spreadsheet rendering
- Rows addition
- Cell validation by column type on blur, keydown events
- Highlight of invalid cell and error message display
- Highlight edited cell
Main Flow
- Start project on localhost or preview it on production link ( https://gov-predict-task.netlify.com/)
- Click on “Create a column” button
- Enter “Title”, “Type” and per desire mark “Required” checkbox
- On selecting type select, an additional field will appear for adding the list of values separated by comma to be contained in the select data
- On required columns, validation will be triggered on first render
- On page will be rendered the initial spreadsheet of 2 columns (row index and values column) and 10 rows with empty values
- To edit column’s title, double click on respective cell from first row of data sheet
- To add a new column, click “Add column” button
- In displayed modal, repeat step 3.
- A new column will be added
- On repeating steps 6, on modal close no column is added
- To add next 10 rows, click on “Add 10 rows” button
- 10 rows with empty values will be populated
- To add value to a cell, double click it, and type (or copy/cut/paste value)
- Validation will be triggered on cell leave - by clicking away from it on any point from page/ to another cell, or by pressing enter/return key
- To trigger validation, enter invalid values to the cell - i.e. string to number specific type, invalid date format other than dd/mm/(19|20)yy, value not matching any of select list values



