Changes between Initial Version and Version 1 of ViewComponents


Ignore:
Timestamp:
12/28/25 22:57:30 (19 hours ago)
Author:
233051
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ViewComponents

    v1 v1  
     1== User opens dashboard ==
     2
     3=== Actors ===
     4Guest, User, Admin
     5
     6=== Scenario ===
     71. The user clicks on the "COMPONENTS" dropdown
     82. A list of all the component types is displayed and the users chooses one
     93. A popup of all the components of that type is displayed
     10{{{
     11SELECT *
     12FROM components
     13WHERE name ILIKE ('%' || $q || '%')
     14ORDER BY
     15  CASE WHEN $sort = 'price_asc'  THEN price END ASC,
     16  CASE WHEN $sort = 'price_desc' THEN price END DESC,
     17  price DESC
     18LIMIT COALESCE($limit, 100);
     19}}}
     204. The user can sort by price
     215. The users can view the details of a component by clicking on it
     22{{{
     23SELECT *
     24FROM components
     25WHERE id = $componentId
     26LIMIT 1;
     27
     28SELECT *
     29FROM $details_table   -- cpu/gpu/memory/storage/power_supply/motherboard/pc_case/cooler/...
     30WHERE component_id = $componentId
     31LIMIT 1;
     32
     33-- if type = pc_case:
     34SELECT * FROM case_storage_form_factors WHERE case_id = $componentId;
     35SELECT * FROM case_ps_form_factors      WHERE case_id = $componentId;
     36SELECT * FROM case_mobo_form_factors    WHERE case_id = $componentId;
     37
     38-- if type = 'cooler':
     39SELECT * FROM cooler_cpu_sockets WHERE cooler_id = $componentId;
     40}}}