| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import BaseCard from './BaseCard'; |
||
| 3 | |||
| 4 | export default class ClosePollFormCard extends BaseCard { |
||
| 5 | create(): chatV1.Schema$GoogleAppsCardV1Card { |
||
| 6 | this.buildHeader(); |
||
| 7 | this.buildSections(); |
||
| 8 | this.buildFooter(); |
||
| 9 | return this.card; |
||
| 10 | } |
||
| 11 | |||
| 12 | buildHeader() { |
||
| 13 | this.card.header = { |
||
| 14 | 'title': 'Are you sure to close the poll?', |
||
| 15 | 'subtitle': 'No one will have the ability to vote.', |
||
| 16 | 'imageUrl': '', |
||
| 17 | 'imageType': 'CIRCLE', |
||
| 18 | }; |
||
| 19 | } |
||
| 20 | |||
| 21 | buildSections() { |
||
| 22 | this.card.sections = []; |
||
| 23 | } |
||
| 24 | |||
| 25 | buildFooter() { |
||
| 26 | this.card.fixedFooter = { |
||
| 27 | 'primaryButton': { |
||
| 28 | 'text': 'Close Poll', |
||
| 29 | 'onClick': { |
||
| 30 | 'action': { |
||
| 31 | 'function': 'close_poll', |
||
| 32 | 'parameters': [], |
||
| 33 | }, |
||
| 39 |