File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,11 +15,7 @@ import Filter from "../../components/Filter";
1515import SerialLogTable from "./SerialLogTable" ;
1616
1717import type { UseQueryResult } from "react-query" ;
18- import type {
19- SerialLog ,
20- SerialLogResponse ,
21- ApiResponse ,
22- } from "../../types/shared" ;
18+ import type { SerialLogResponse , ApiResponse } from "../../types/shared" ;
2319
2420function SerialLog ( ) : React . JSX . Element {
2521 const { id, modelId } = useParams ( ) ;
Original file line number Diff line number Diff line change @@ -18,8 +18,12 @@ function SerialLogTable(): React.JSX.Element {
1818 { content : "Brand" } ,
1919 {
2020 content : "Model" ,
21+ sortKey : "model-name" ,
22+ } ,
23+ {
24+ content : "Serial" ,
25+ sortKey : "serial" ,
2126 } ,
22- { content : "Serial" } ,
2327 {
2428 content : "Created date" ,
2529 className : "u-align--right" ,
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ const serialLogsListState = atom([] as SerialLog[]);
77const serialLogsListFilterState = atom ( "" as string ) ;
88
99function getFilteredSerialLogs (
10- SerialLogs : Array < SerialLog > ,
10+ serialLogs : Array < SerialLog > ,
1111 filterQuery ?: string | null ,
1212) {
1313 if ( ! filterQuery ) {
14- return SerialLogs ;
14+ return serialLogs ;
1515 }
1616
17- return SerialLogs . filter ( ( serialLog : SerialLog ) => {
17+ return serialLogs . filter ( ( serialLog : SerialLog ) => {
1818 if ( serialLog . serial && serialLog . serial . includes ( filterQuery ) ) {
1919 return true ;
2020 }
You can’t perform that action at this time.
0 commit comments