Skip to content

Component Tracking and recursive layout #313

Closed Answered by DSMejantel
DSMejantel asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
Dynamic component is magic ! Just like you ! Thanks.

select 'dynamic' as component,
  '[' ||
    json_object(
          'component', 'tracking',
          'title', 'Rangée ' || rang,
          'width', 4
    ) || ',' ||
    group_concat(json_object(
        'title', 'Ruche '||numero,
        'color', case tracing when 3 then 'red' when 2 then 'orange' else 'green' end
    )) ||
  ']' as properties
from colonie WHERE colonie.rucher_id=$id and disparition::int<>1 and $tab='1' GROUP BY rang ORDER BY rang;

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@lovasoa
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by lovasoa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
functions Related to built-in sqlpage functions
2 participants