diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-10 00:47:10 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-11-10 00:47:10 +0100 |
commit | c60a60422f69e29628b6c946a15be271e90015aa (patch) | |
tree | 258d128b50f5f162b1feb5e9416f6062ca51fb72 /static/vevent.ts | |
parent | Handle calendar change through dropdown. (diff) | |
download | calp-c60a60422f69e29628b6c946a15be271e90015aa.tar.gz calp-c60a60422f69e29628b6c946a15be271e90015aa.tar.xz |
Basic event modification works again.
Diffstat (limited to '')
-rw-r--r-- | static/vevent.ts | 15 |
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*/]] } |