2018-10-01 20:31:18 +00:00
|
|
|
// License: LGPL-3.0-or-later
|
|
|
|
export interface Dedication {
|
|
|
|
type?:'honor'|'memory',
|
|
|
|
supporter_id?: number,
|
|
|
|
name?:string
|
2018-10-11 16:35:53 +00:00
|
|
|
contact?: {
|
|
|
|
email?: string,
|
|
|
|
phone?:string
|
|
|
|
address?:string
|
|
|
|
}
|
2018-10-01 20:31:18 +00:00
|
|
|
note?:string
|
|
|
|
}
|
|
|
|
|
|
|
|
export function parseDedication(dedication?:string) : Dedication {
|
|
|
|
if (!dedication || dedication == "")
|
|
|
|
return {}
|
|
|
|
return JSON.parse(dedication)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function serializeDedication(dedication:Dedication) : string {
|
|
|
|
return JSON.stringify(dedication)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|