make a cctv.html
same like report.html
but in camera table, i want
# || Camera || Status (but this have toogle, to set active/inactive), so this page cant update report, but can toogle from active to inactive || Sort (Arrow up and down) || Action (for delete button)
so in cameras table in database , create new column, default is active
also add column called sort_number, its store same like id, but it can be change, to change sort order, also display it by this sort order,
also in table can change sort order, have arror button, to move up and down, it will swap sort_number
also make sure any changes only work if editMode is true
make a camera_part.html same like that report.html, but
Category change to Part
store
selectedPartId in localstorage
no location
Camera change to Part History
and display all part history in table
have popup show like add camera, but in that popup have Notes only it will create part_history, also store added_date
use camera_id from localstorage,
selectedCameraId
u need to create table for database first
parts
part_id pk
camera_id fk on delete cascade
user_id fk on delete cascade
part_name
part_history
part_history_id pk
part_id fk on delete cascade
camera_id fk on delete cascade
user_id fk on delete cascade
action 'Added','Replaced','Removed' default Added
added_date
replaced_date
removed_date default null
notes
# || Action (have 3 button, Added, Replaced, Removed, make 3 button color is grey, so if click its store date in added_date, replaced_date, removed_date, if have date in added_date, so make button color green, if have date in replaced_date orange, for removed_date red) || Added Date || Replaced Date || Removed Date (for date if null, dont display anything)|| Note ||
store and display date in DD/MM/YYYY
make sure only can make change if editMode true