File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -371,9 +371,18 @@ function ColumnGroup({ data, linkPrefix }) {
371371}
372372
373373function ColumnItem ( { data, linkPrefix = "/" } ) {
374- const { col_id, col_name, units } = data ;
374+ const { col_id, col_name, t_units , t_sections } = data ;
375375
376- const unitsText = units ?. length > 0 ? `${ units ?. length } units` : "empty" ;
376+ const unitsText = t_units > 0 ? `${ t_units } units` : "no units" ;
377+
378+ let gbpTag = null ;
379+ if ( t_sections > 0 ) {
380+ gbpTag = h (
381+ Tag ,
382+ { minimal : true , color : "goldenrod" , size : "small" } ,
383+ `${ t_sections } packages`
384+ ) ;
385+ }
377386
378387 const href = linkPrefix + `columns/${ col_id } ` ;
379388 return h (
@@ -393,13 +402,13 @@ function ColumnItem({ data, linkPrefix = "/" }) {
393402 { minimal : true , color : "lightgreen" , size : "small" } ,
394403 "in process"
395404 ) ,
396- " " ,
405+ gbpTag ,
397406 h (
398407 Tag ,
399408 {
400409 minimal : true ,
401410 size : "small" ,
402- color : units ?. length = == 0 ? "orange" : "dodgerblue" ,
411+ color : t_units == 0 ? "orange" : "dodgerblue" ,
403412 } ,
404413 unitsText
405414 ) ,
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ interface ColumnResponseShort {
1212 col_area : number ;
1313 col_type : "column" | "section" ;
1414 refs : number [ ] ;
15+ t_units : number ;
16+ t_sections : number ;
1517}
1618
1719export interface ColumnGroup {
You can’t perform that action at this time.
0 commit comments