Coder Social home page Coder Social logo

bill's Introduction

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Description :

Hi, I have used create react app and Material UI in this project. The project consist of data.json file which has products which NoviCap is selling on its store and can be edited. Json has all the details of individual product, and currency.

Since, on browser, I am not able to produce scan from device. Hence, I have used keyboard keys to trigger event which could be same as scan event. I have assigned codes to each keyboard key, where "j" key holds code for Voucher, "k" key holds code for mug and "l" key holds code for Tshirt.

Hence, when you click on the bar and press any of these keys, it would add the item to the list and show the total infront of Total: Step 1 : Click on the bar which says "Click here to start scanning". Step 2 : Press key assigned to the Product code, to scan.

If it matches, it will be added in the list. If not it will not.

The logic for discounts on Tshirt is that whenever the count of Tshirts is more than 3, it would remove $1 from each which is total sum of all minus total number of Tshirts.

The logic for discounts on Voucher is that whenever count of voucher is multiple of Two, the discount would be 50% i.e Sum divided by two. else if it is not the number of voucher would be incremented by one and divided by two automatically.

For the Test Purpose if you would like to add more product you can add in Json, but since we are not getting any response from the, we will have to assign a value in a constant variable and match.

bill's People

Contributors

uditguru avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.