Created
November 10, 2019 06:42
-
-
Save ckkashyap/b14b51510be9a1bd41bb70cf4478f390 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(load "@lib/http.l" "@lib/xhtml.l" "@lib/form.l") | |
(class +Task +Entity) | |
(rel nr (+Need +Key +Number)) | |
(rel ttl (+IdxFold +String)) | |
(rel sts (+Sn +IdxFold +String)) | |
(rel tgs (+Sn +IdxFold +String)) | |
(rel dt (+Need +Ref +Date)) | |
(rel upds (+List +Joint) tsk (+Update)) | |
(dm url> (Tab) | |
(and (list "tsk.l" '*ID This)) ) | |
(class +Update +Entity) | |
(rel tsk (+Joint) upds (+Task) ) | |
(rel dsc (+Sn +IdxFold +String)) | |
(rel dt (+Need +Ref +Date)) | |
(rel tm (+Need +Ref +Time)) | |
(setq *Rows 3) | |
(de ui-main () | |
(app) | |
(action | |
(html 0 Ttl "@lib.css" NIL | |
(form NIL | |
(<grid> "------." | |
"Name" (gui 'nm '(+DbHint +TextField) '(nm +Task) 20) | |
"Status" (gui 'sts '(+DbHint +TextField) '(sts +Task) 20) | |
"Tags" (gui 'tgs '(+DbHint +TextField) '(tgs +Task) 20) | |
(searchButton '(init> (: home query))) | |
) | |
(gui 'query '(+QueryChart) *Rows | |
'(goal | |
(quote | |
@Nr NIL | |
(select (@@) | |
( (nr +Task @Nr) ) | |
) | |
) | |
) | |
3 | |
'((This) (list This (: sts) (: ttl))) | |
) | |
(<table> NIL (choTtl "Entries" '+Task) | |
(quote | |
("em20 align" "C1") | |
("em20 align" "C2") | |
("em20 align" "C3") | |
) | |
(do *Rows | |
(<row> NIL | |
(gui 1 '(+ObjView +TextField) '(: ttl)) | |
(gui 2 '(+View +TextField)) | |
(gui 3 '(+View +TextField)) | |
) | |
) | |
) | |
(scroll *Rows) | |
) | |
) | |
) | |
) | |
(de main () | |
(pool "tasks.db") | |
) | |
(de go () | |
(rollback) | |
(server 8080 "!ui-main") | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(html 0 Ttl "@lib.css" NIL | |
(form NIL | |
(gui '(+Set +E/R +Chart) '((L) (filter bool L)) '(upds . *ID) 3 | |
'( (U I) (with U (list (: dsc) (: dt) (: tm) ) )) | |
'( (A B) (out "+/tmp/debug.txt" (prinl A B))) | |
) | |
(<table> 'chart NIL | |
'(("em7" "Updates") ("em7" "Date") ("em7" "Time") ) | |
(do 4 | |
(<row> (alternating) | |
(gui 1 '(+TextField) 100) | |
(gui 2 '(+DateField) 100) | |
(gui 3 '(+TimeField) 100) | |
) | |
) | |
) | |
(scroll 4) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment