SDN302_-_SP_2025_-_PE_3487.webp
xin_chao

SDN302_-_SP_2025_-_PE_3487.webp

  • Media owner xin_chao
  • Ngày thêm
Kizspy.me
Implement CRUD actions with model collection.
Validate input data to ensure it meets data integrity rules (e.g., format, type, range, unique)
when creating, deleting or updating data through the API.
Task 03 (4.0 marks). Client application for device management
Student must choose one of template engines (EJS, HANDLEBARS, or PUG) with Express for
building the views
1. Authentication function
At the login view, members must enter their username and password correctly (encrypted with
bcrypt and stored in the 'users' collection). All CRUD actions require authentication. Display error
messages for failed logins. Store user data in the 'users' collection from 'user.json'. Redirect to the
dashboard view after a successful login
2. Check if logging in successfully, show the list of all devices (using the card view not table view)
including the model name. This route path will match request to /devices
3. Check if logging in successfully, delete the selected item by confirming and notifying the result.
4. Check if logging in successfully, add new device with the requirements:
All fields are required.
Value for deviceName includes a-z, A-Z, /, space. Name of device must be unique.
The cost of the device must be a number between 0 and 1999.99. The default currency is USD.
-
The isFamous value must be a toggle or switch control.
-
The saleOff value must be a number between 0 and 100 (showing the percent unit).
The model field must be a select control, the data in the select must appear as modelName
which is taken from model collection.
5. Check if logging in successfully, update the list of devices, all the controls require same of adding
function. This route path will match requests to /devices/:id
Zoom
+ 100%
The and of tant
Close
Chưa có bình luận nào.

Thông tin

Category
SDN302
Thêm bởi
xin_chao
Ngày thêm
Lượt xem
1,398
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom