Skip to content

Commit f6a0daf

Browse files
committed
Add toJson method to baseFrame
1 parent 9de53b9 commit f6a0daf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/models/baseFrame.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ class baseFrame {
5656
return moment();
5757
}
5858

59+
toJson() {
60+
return JSON.stringify({
61+
id: this.id,
62+
project: this.project,
63+
resource: this.resource,
64+
notes: this.notes,
65+
start: this._start,
66+
stop: this._stop,
67+
timezone: this.timezone
68+
});
69+
}
70+
5971
get duration() {
6072
return moment(this.stop).diff(this.start) / 1000;
6173
}

0 commit comments

Comments
 (0)