()
| 53 | } |
| 54 | |
| 55 | status () { |
| 56 | const endDate = this.get('endDate') |
| 57 | if (endDate && (new Date(endDate) < new Date())) { |
| 58 | return 'expired' |
| 59 | } |
| 60 | |
| 61 | const startDate = this.get('startDate') |
| 62 | if (startDate && (new Date(startDate) > new Date())) { |
| 63 | return 'pending' |
| 64 | } |
| 65 | |
| 66 | if (this.openSpots() <= 0) { |
| 67 | return 'empty' |
| 68 | } |
| 69 | |
| 70 | return 'available' |
| 71 | } |
| 72 | |
| 73 | typeDescription () { |
| 74 | const type = this.get('type') |
no test coverage detected