projectRecRow builds plain and colored column values for a project recommendation.
(rec ProjectRecommendation, columns []string, r *lipgloss.Renderer)
| 252 | |
| 253 | // projectRecRow builds plain and colored column values for a project recommendation. |
| 254 | func projectRecRow(rec ProjectRecommendation, columns []string, r *lipgloss.Renderer) ([]string, []string) { |
| 255 | plain := make([]string, len(columns)) |
| 256 | colored := make([]string, len(columns)) |
| 257 | for i, col := range columns { |
| 258 | switch col { |
| 259 | case "project": |
| 260 | plain[i] = rec.ProjectID |
| 261 | colored[i] = rec.ProjectID |
| 262 | case "id": |
| 263 | qualID := rec.ProjectID + ":" + rec.ID |
| 264 | plain[i] = qualID |
| 265 | colored[i] = formatTaskID(qualID, r) |
| 266 | default: |
| 267 | plain[i] = getNextColumnValue(&rec.Recommendation, col) |
| 268 | colored[i] = colorizeNextColumn(&rec.Recommendation, col, r) |
| 269 | } |
| 270 | } |
| 271 | return plain, colored |
| 272 | } |
| 273 | |
| 274 | // expandNextShortcutFilters appends --status and --priority values to nextFilters. |
| 275 | func expandNextShortcutFilters() { |
no test coverage detected