From feebf252b4a51467863ccba5d25b180548f79ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 6 Apr 2022 01:09:31 +0200 Subject: work --- module/calp/html/view/calendar.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'module/calp/html/view/calendar.scm') diff --git a/module/calp/html/view/calendar.scm b/module/calp/html/view/calendar.scm index 6945c5d2..25cfb575 100644 --- a/module/calp/html/view/calendar.scm +++ b/module/calp/html/view/calendar.scm @@ -10,7 +10,6 @@ fmt-day make-block fmt-single-event - output-uid )) :use-module (calp html config) :use-module (calp html util) @@ -30,6 +29,8 @@ :use-module (ice-9 format) :use-module (calp translation) + :use-module ((vcomponent formats xcal output) + :select (vcomponent->sxcal)) ) @@ -380,11 +381,11 @@ window.default_calendar='~a';" (date+ post-end (date day: 1)))) events)))) (repeating% regular (partition repeating? flat-events)) + ;;; TODO (repeating (for ev in repeating% (define instance (copy-vcomponent ev)) - (set! (prop instance 'UID) (output-uid instance)) (delete-parameter! (prop* instance 'DTSTART) '-X-HNH-ORIGINAL) (delete-parameter! (prop* instance 'DTEND) '-X-HNH-ORIGINAL) @@ -417,5 +418,9 @@ window.default_calendar='~a';" (div (@ (style "display:none !important;") (id "xcal-data")) ,((@ (vcomponent formats xcal output) ns-wrap) - (map (@ (vcomponent formats xcal output) vcomponent->sxcal) - (append regular repeating))))))))) + (append + (map vcomponent->sxcal regular) + (map (lambda (ev) + (set! (prop ev 'X-HNH-INSTANCE-ID) + (datetime->string (as-datetime (prop ev 'DTSTART)))) + (vcomponent->sxcal ev)) repeating))))))))) -- cgit v1.2.3