Giter Site home page Giter Site logo

dsk's Introduction

DsK Tech Challenge

Task to use an API endpoint for the following product IDS 143249,142593,141975,150605. Can enter one id or multiple separated by a comma.

Pictures and logo are from DsK website.

To Run

Open up the index.html in the browser.

Notes

Funcs:

Functions that relates to the DOM are in scripts.js. Functions that don't relate to the DOM are in helperFuncs.js

Input:

The input field for ids is only accepts [0-9] and comma

It will only type out 6 numbers or (numsPressed % 6 === 0), after that it will preventDefault until you use a comma.

Fetch Request:

Currently, for the ids provided they all have 0 stock so I included some dummy data for the sorting button.

Please refer to scripts.js ln 232 - 278 and uncomment SIMILATE for the sort btns and comment out the FETECH

Libraries and Frameworks:

None, I decided to use vanilla JS, HTML, and CSS because I believe this will best display my capabilities.

Tasks

  • After submitting the form the user should be able to see all the existent sizes for that product(s) classified in 2 groups: in stock (qty > 0) and out of stock (qty = 0).

  • Also make sure to list the available quantity for each size in front of the size.

  • The form should also work with a collection of products, i.e 143249,142593,141975,150605 instead of one single id and should produce the same result for each product.

  • The sizes must be shown sorted by quantity. Also add an option so the user can sort the sizes on ascending and descending order based on the quantity.

  • The user should be able to submit the form by hitting a submit button and by hitting the enter key on the input field.

  • Make sure that the form validates the type of data entered. Your function should only accept integer numbers for product id’s.

  • Also it’s important that the web form and listed results are easy for the user to see on any type of device including smartphones.

dsk's People

Contributors

tannaciousxp avatar

Watchers

James Cloos avatar  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.