( status: FeedbackStatus, isTeamView = false, )
| 2 | |
| 3 | // Authors see spam as a plain close; the real reason stays with the team |
| 4 | export const getFeedbackStatusLabel = ( |
| 5 | status: FeedbackStatus, |
| 6 | isTeamView = false, |
| 7 | ): string => { |
| 8 | switch (status) { |
| 9 | case FeedbackStatus.Pending: |
| 10 | return 'Submitted'; |
| 11 | case FeedbackStatus.Processing: |
| 12 | return 'Under Review'; |
| 13 | case FeedbackStatus.Accepted: |
| 14 | return 'Acknowledged'; |
| 15 | case FeedbackStatus.Completed: |
| 16 | return 'Resolved'; |
| 17 | case FeedbackStatus.Cancelled: |
| 18 | return 'Closed'; |
| 19 | case FeedbackStatus.Spam: |
| 20 | return isTeamView ? 'Spam' : 'Closed'; |
| 21 | case FeedbackStatus.Failed: |
| 22 | return 'Needs review'; |
| 23 | default: |
| 24 | return 'Submitted'; |
| 25 | } |
| 26 | }; |
| 27 | |
| 28 | export const isFeedbackClosed = (status: FeedbackStatus): boolean => |
| 29 | [ |
no outgoing calls
no test coverage detected