About this Application -
It is having 2 Tabs in the index.html.
- HOME - which is having a serch text box showing auto suggestion for the different products.Once a product is getting selected its detail information will come just below to that text box.The details include Product Id , Product Name, Quantity,Cost Price , Selling Price.Out of all these feilds only 2 fields are ediatble - Produtc Name and Selling Price.You can update these 2 fields by changing the text and then press enter,it will get updated in the database. Validations - i) Selling Price must be greater than or equal Cost Price. ii) Product Name cannot be blank.
2)EDIT - which is having a form which will add new product in the database.After filling all the data and press Enter or select "Add" button to add that product in the database. Validations -i) All the fields are required. ii) Selling Price must be greater than or equal Cost Price.
I have used following things to mak this happen.
-
Mongo DB for the database.
-
Node js , epress js for the server.
-
Bootstrap , Angular js for the front end.
Files informations -
-
index.html - It is a main page having 2 views in 2 different tabs
-
home.html - It is a separate view for the HOME tab.
-
edit.html - It is a separate view for the EDIT tab.
-
main.js - External javascript page having module,controllers,validations etc.
-
server.js - External javascript file which will take the request and send response back to browser.
Directory Structure -
- Public -
a) edit.html
b) home.html
c) index.html
d) JS -
i) main.js
- server.js