UNPKG

trello-sprinter

Version:

Provides summarizations of sprint activity in a Trello project

64 lines (57 loc) 1.2 kB
/** * @file * Representation of a Trello comment on a card */ import {Util} from "./Util"; /** Array ( [id] => 57eec1ca22684646b1193abd [idMemberCreator] => 57ec1bdafeedcbbc73d600d1 [data] => Array ( [list] => Array ( [name] => Design [id] => 57e920a2b34518203fd5f319 ) [board] => Array ( [shortLink] => i9eXE4yJ [name] => Project 1 Team: Arbo [id] => 57e9204ac3f323f1785d7be4 ) [card] => Array ( [shortLink] => Fggvd4nX [idShort] => 21 [name] => Visual Paradigm Class Design [id] => 57eec0776fd005f7b81c8239 ) [text] => Visual Paradigm Class Design ) [type] => commentCard [date] => 2016-09-30T19:49:30.974Z [memberCreator] => Array ( [id] => 57ec1bdafeedcbbc73d600d1 [avatarHash] => [fullName] => Brittany Galliers [initials] => BG [username] => brittanygalliers1 ) * @param board * @param card * @param data * @constructor */ export const Comment = function(board, card, data) { this.board = board; this.card = card; this.member = data.idMemberCreator; this.text = '<p>' + Util.strip_tags(data.data.text).replace(/\n/gm, '<p>') + '</p>'; this.data = data; this.date = new Date(Date.parse(data.date)); }