== User opens dashboard == === Actors === Guest, User, Admin === Scenario === 1. The user clicks on the "COMPONENTS" dropdown 2. A list of all the component types is displayed and the users chooses one 3. A popup of all the components of that type is displayed {{{ SELECT * FROM components WHERE name ILIKE ('%' || $q || '%') ORDER BY CASE WHEN $sort = 'price_asc' THEN price END ASC, CASE WHEN $sort = 'price_desc' THEN price END DESC, price DESC LIMIT COALESCE($limit, 100); }}} 4. The user can sort by price 5. The users can view the details of a component by clicking on it {{{ SELECT * FROM components WHERE id = $componentId LIMIT 1; SELECT * FROM $details_table -- cpu/gpu/memory/storage/power_supply/motherboard/pc_case/cooler/... WHERE component_id = $componentId LIMIT 1; -- if type = pc_case: SELECT * FROM case_storage_form_factors WHERE case_id = $componentId; SELECT * FROM case_ps_form_factors WHERE case_id = $componentId; SELECT * FROM case_mobo_form_factors WHERE case_id = $componentId; -- if type = 'cooler': SELECT * FROM cooler_cpu_sockets WHERE cooler_id = $componentId; }}}