| 19 | } from '../../utils/database.js'; |
| 20 | |
| 21 | function getApplicationStatusPresentation(statusValue) { |
| 22 | const normalized = typeof statusValue === 'string' ? statusValue.trim().toLowerCase() : 'unknown'; |
| 23 | const statusLabel = |
| 24 | normalized === 'pending' ? 'In Progress' : |
| 25 | normalized === 'approved' ? 'Accepted' : |
| 26 | normalized === 'denied' ? 'Denied' : |
| 27 | 'Unknown'; |
| 28 | const statusEmoji = |
| 29 | normalized === 'pending' ? '🟡' : |
| 30 | normalized === 'approved' ? '🟢' : |
| 31 | normalized === 'denied' ? '🔴' : |
| 32 | '⚪'; |
| 33 | |
| 34 | return { normalized, statusLabel, statusEmoji }; |
| 35 | } |
| 36 | |
| 37 | export default { |
| 38 | slashOnly: true, |