|
@@ -13,6 +13,7 @@ SELECT 'shell' AS component
|
|
, 'dark' AS theme
|
|
, 'dark' AS theme
|
|
, :title AS title
|
|
, :title AS title
|
|
, 'fluid' AS layout
|
|
, 'fluid' AS layout
|
|
|
|
+, '/activity' AS link
|
|
;
|
|
;
|
|
|
|
|
|
SELECT 'text' AS component
|
|
SELECT 'text' AS component
|
|
@@ -64,14 +65,22 @@ SELECT 'select' AS type
|
|
'selected', activity = 'Unknown'
|
|
'selected', activity = 'Unknown'
|
|
)) FROM activities WHERE user = :user
|
|
)) FROM activities WHERE user = :user
|
|
) AS options
|
|
) AS options
|
|
-, 8 AS width
|
|
|
|
|
|
+, 7 AS width
|
|
;
|
|
;
|
|
SELECT 'datetime-local' AS type
|
|
SELECT 'datetime-local' AS type
|
|
, 'ts' AS name
|
|
, 'ts' AS name
|
|
, 'Date and Time' AS label
|
|
, 'Date and Time' AS label
|
|
, '' AS value
|
|
, '' AS value
|
|
, 4 AS width
|
|
, 4 AS width
|
|
-;SELECT 'card' AS component
|
|
|
|
|
|
+;
|
|
|
|
+
|
|
|
|
+SELECT 'button' AS component
|
|
|
|
+SELECT 'Week' AS title
|
|
|
|
+, 1 AS width
|
|
|
|
+, '/activity?week=week' AS link
|
|
|
|
+;
|
|
|
|
+
|
|
|
|
+SELECT 'card' AS component
|
|
, 1 AS columns
|
|
, 1 AS columns
|
|
;
|
|
;
|
|
|
|
|
|
@@ -80,5 +89,5 @@ SELECT date(datetime(CURRENT_TIMESTAMP, '-'|| value ||' days'), 'localtime') AS
|
|
'?user='||:user||
|
|
'?user='||:user||
|
|
'&date='|| REPLACE(datetime(CURRENT_TIMESTAMP, '-'|| value ||' days'), ' ', '+') ||
|
|
'&date='|| REPLACE(datetime(CURRENT_TIMESTAMP, '-'|| value ||' days'), ' ', '+') ||
|
|
'&_sqlpage_embed' AS embed
|
|
'&_sqlpage_embed' AS embed
|
|
-FROM json_each(json('[0, 1, 2, 3, 4, 5, 6, 7]'))
|
|
|
|
|
|
+FROM json_each(json(CASE $week WHEN 'week' THEN '[0, 1, 2, 3, 4, 5, 6, 7]' ELSE '[0, 1]' END))
|
|
;
|
|
;
|