Docsity

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

Toggle sidebar
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.