Design and develop a Cash Book application using React.js, follow the below instruction to complete the submission.
To begin developing the **` Cash Book`**, an empty state is required and must consist of the screenshot shown below.
![enter image description here][2]
And Today's Balance
should be zero
with No Entry Found!
message at the centre of the screen.
Add two action buttons at the bottom (refer the App.css
provided).
IN
Button (used to make an entry for cash-in)OUT
Button (used to make an entry for cash-out)
![enter image description here][3]
## What are Cash-in and Cash-out?
- whenever an amount is received we record an entry for it (amount received) as
cash-in
. - whenever we spend any amount on something we record an entry for it (amount spent) as
cash-out
.
![enter image description here][4]
When creating an entry for cash-in we take `amount`, `note`, `timestamp`, `type` (refer the mock folder for details)
## Perform validation:
amount
should be of theInteger
orFloat
note
should be aString
- create new entry button should be disabled for invalid values
![enter image description here][5]
Similarly, we do for `cash-out` and perform the required validation as mentioned above.
# **Refer `App.test.js` for testing your submission, please make sure to include `testid`(exactly same as mentioned in the test) of the elements to get maximum score and run you test locally and submit `App.js` file in the below submission form once you are done with the development.**
# Demo Video
<iframe width="560" height="315" src="https://www.youtube.com/embed/HgnXDH8eJVc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
# Create Entry "/entry" **[Request]**
``` { note: "foobar", amount: 10.00, type: 1, timestamp: "Tue Jan 05 2021 14:36:56 GMT+0530 (India Standard Time)" } ```
**[Response]**
``` { message: 'entry created' } ```
# Get Entries "/entry" **[Response]**
``` [ ... { note: "foobar", amount: 10.00, type: 1, timestamp: "Tue Jan 05 2021 14:36:56 GMT+0530 (India Standard Time)" }, ... ] ```
Test Instruction:
- You will be given 2 hours to complete the test.
- Please avoid adding any new dependency to project.
- Make sure to follow all the instruction properly to get the maximum score.
- You must have Node, Yarn and Code Editor of your choice install on your system to continue with the test.
- Use Help Button, for any query related to the problem statement.
- Once the test is completed, please make sure to submit
App.js
All the best!