Admin Dashboard: Managing Shops and Products - Prof. Sơn, Lab Reports of Computer Science

The creation of routes and views in node.js for an admin dashboard that allows a director to manage shops and products. The director can view a table of all shops or specific shops, and choose between them to display related images. The creation of a form for the director to make selections.

Typology: Lab Reports

2021/2022

Uploaded on 11/22/2022

phan-minh-tien-fgw-dn
phan-minh-tien-fgw-dn 🇻🇳

4.7

(12)

47 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Index.js
In this file, I required models gen-box to use selsect_box
Next, I create a route post select_box to render admin and show select_box and table with role director.
Then, In login page I use If-clause to set role director and function of it when I login.
Admin.ejs
In this file, I create view table_string and select_box.
Select_box.js
In this file, I make a form select_box to director choose.
pf3
pf4

Partial preview of the text

Download Admin Dashboard: Managing Shops and Products - Prof. Sơn and more Lab Reports Computer Science in PDF only on Docsity!

Index.js

In this file, I required models gen-box to use selsect_box

Next, I create a route post select_box to render admin and show select_box and table with role director.

Then, In login page I use If-clause to set role director and function of it when I login.

Admin.ejs

In this file, I create view table_string and select_box.

Select_box.js

In this file, I make a form select_box to director choose.

table_display.js

I use query to list all product when director login or list product with shop_id when user login. Then Display all data from table in database.

Shop ddd

Shop_B

When I choose option Shop_B the image will display as image.

Shop_C

When I choose option Shop_C the image will display as image.