aboutsummaryrefslogtreecommitdiff
path: root/static/vevent.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-11-10 00:47:10 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-11-10 00:47:10 +0100
commitc60a60422f69e29628b6c946a15be271e90015aa (patch)
tree258d128b50f5f162b1feb5e9416f6062ca51fb72 /static/vevent.ts
parentHandle calendar change through dropdown. (diff)
downloadcalp-c60a60422f69e29628b6c946a15be271e90015aa.tar.gz
calp-c60a60422f69e29628b6c946a15be271e90015aa.tar.xz
Basic event modification works again.
Diffstat (limited to 'static/vevent.ts')
-rw-r--r--static/vevent.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/static/vevent.ts b/static/vevent.ts
index c9068106..d8ef58ce 100644
--- a/static/vevent.ts
+++ b/static/vevent.ts
@@ -1,4 +1,4 @@
-import { ical_type, valid_input_types, JCal } from './types'
+import { ical_type, valid_input_types, JCal, JCalProperty } from './types'
import { uid, parseDate } from './lib'
export { VEvent, xml_to_vcal }
@@ -141,11 +141,14 @@ class VEvent {
}
to_jcal(): JCal {
- let out_properties = []
- for (let [key, value] of Object.entries(this.properties)) {
- let sub = value.to_jcal();
- sub.unshift(key)
- out_properties.push(sub);
+ let out_properties: JCalProperty[] = []
+ console.log(this.properties);
+ for (let [key, value] of this.properties) {
+ let prop: JCalProperty = [
+ key.toLowerCase(),
+ ...value.to_jcal(),
+ ]
+ out_properties.push(prop);
}
return ['vevent', out_properties, [/* alarms go here*/]]
}