GithubHelp home page GithubHelp logo

cookie_stand_admin's Introduction

Author: Matthew Holder Version: 0.3

Deployed URL ReactI PR ReactII PR ReactIII PR ReactIV

Cookie Stand Admin

React I

  • pages/Index.js should…
  • Have <Head> component with page title set to Cookie Stand Admin
  • Have a header component that matches spec.
  • Have a <main> component containing <form> and a placeholder component showing JSON string of last created Cookie Stand.
  • Have a <footer> component that matches spec.
  • Style app using TailwindCSS utility classes.

React II

  • pages/Index.js should return top level component <CookieStandAdmin>
  • <CookieStandAdmin> details…
    • Have a <Head> component.
    • Have a custom <Header> component that matches spec.
    • Have a <main> component.
      • Within <main> have custom <CreateForm> and <ReportTable> components.
    • Have a custom <Footer> component that matches spec.
    • Import time slot data from supplied data.js file.
  • <Head> should set page title Cookie Stand Admin
  • <Header> component should have Next <Link> to overview page.
  • <CreateForm> component details…
    • Receive an onCreate function to be called when form is submitted.
    • onCreate should be passed argument object representing new cookie stand.
      • Object should have location property.
      • Object should have hourly_sales property with hard coded [48, 42, 30, 24, 42, 24, 36, 42, 42, 48, 36, 42, 24, 36]
  • <ReportTable> details…
    • should receive hours on props that is an array cookie stand hours of operation.
    • should receive reports on props that is an array all cookie stand objects.
    • If reports is empty then render <h2>No Cookie Stands Available</h2>
    • If reports is not empty then render a table with thead,tbody and tfoot components.
    • Component should render to match spec.
    • Component is responsible for tallying totals for each cookie stand as well as all cookie stands per hourly slot. ----- FIND A WAY TO ADD THAT TD TO THE END OF THE LIST. HOPEFULLY CLEANLY IN THE .map BUT PRIOIRITIZE SPEED
  • <Footer> component details…
    • Should receive reports array on props.
    • Should display X Locations World Wide where X is number of cookie stands.
  • <Header>,<Footer>,<CreateForm> and <ReportTable> should each be in own file inside top level components folder.
  • Those components should be imported into Index.js
  • Overview page details…
  • should live in pages/overview.js
  • should render <Link href="/"><a>Return to Main page</a></Link>
  • Style all components using TailwindCSS utility classes to match spec.

React III

  • pages/Index.js should export a <Home> component.
  • <Home> requirements
    • If user is NOT logged in then <LoginForm> should render.
    • If user IS logged in then <CookieStandAdmin> component should render.
  • <LoginForm> requirements
    • Should receive a function passed in to call when form is submitted.
    • The function should be called with username and password arguments.
  • <CookieStandAdmin> requirements
    • When user fills out form to add location then the data should be posted to API
    • While waiting for API response the <CookieStandTable> should render the new row in a pending state.
    • When API response is complete then <CookieStandTable> should render latest data.
  • <CookieStandTable> requirements
    • Component should continue to display Cookie Stand info as in version 2
    • Add a delete icon in each stand’s location cell.
    • Clicking delete icon should immediately delete the Cookie Stand.
    • API should be informed that Cookie Stand was deleted.
  • Continue to style all components using TailwindCSS utility classes to match spec.

cookie_stand_admin's People

Contributors

holdermatthew5 avatar

Watchers

 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.