


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



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.