GithubHelp home page GithubHelp logo

Comments (3)

EsraZengn avatar EsraZengn commented on April 30, 2024
  • Implemented Frontend: 2 and Backend: 1 and 2/a. (which means when the user visits a products page, the numberOfViews of related product is incremented by 1)

  • I implemented 2/b but had some issues with mongoose query. I couldn't manage to get top three viewed elements of each product category with a single query , so in the end I decided to first get categories with related products from db by grouping by category and then since the returning result would be array of category objects with sub products array, use related array methods (map the result -> sort sub array products -> get only top three viewed products) to get the data that I want which is in a format like this:

[
   {
     _id: "table",   // category name
     producst: [
        {1. product},
        {2. product}
        {3. product}
     ]
   },
   {
     _id: "bed",
     producst: [
        {1. product},
        {2. product}
        {3. product}
     ]
   }
....
]

from class23-project.

ahmthsrvsmz avatar ahmthsrvsmz commented on April 30, 2024

Day 1

  • Created dashboard button on header.

    • User cannot see this button, just available for root and admin
  • Created dashboard page file.

    • Admins and root can see this page. There is a chart that consider 3 most viewed product in every category.
    • There is a one issue that chart doesnโ€™t allow grouped this products.

from class23-project.

EsraZengn avatar EsraZengn commented on April 30, 2024

I revised /api/view.js to get top viewed ten products in addition to top three products of each category. Helped Ahmet with the charts and added tabs to show bar chart of top viewed ten products and doughnut charts of each category's top three products in different tab panels and finally added some styling.

from class23-project.

Related Issues (15)

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.