Remove task categories from portal, fix HUD color logic
- Remove Task Categories section from Task Admin page (deprecated) - Simplify HUD getCategoryColor() to use TaskTypeColor directly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4cfcb728cc
commit
48bdbb362e
2 changed files with 3 additions and 20 deletions
|
|
@ -248,15 +248,12 @@ const HUD = {
|
|||
return this.categories[task?.TaskCategoryID]?.name || 'Task';
|
||||
},
|
||||
|
||||
// Get category/task type color - prefer task type color for service bell tasks
|
||||
// Get task type color from tt_TaskTypes
|
||||
getCategoryColor(task) {
|
||||
if (task && task.TaskTypeColor && task.TaskTypeColor.length > 0 && task.TaskTypeColor !== '#9C27B0') {
|
||||
if (task && task.TaskTypeColor && task.TaskTypeColor.length > 0) {
|
||||
return task.TaskTypeColor;
|
||||
}
|
||||
if (task && task.Color && task.Color !== '#888888') {
|
||||
return task.Color;
|
||||
}
|
||||
return this.categories[task?.TaskCategoryID]?.color || '#888888';
|
||||
return '#9C27B0'; // Default purple
|
||||
},
|
||||
|
||||
// Handle bar press (start long press timer)
|
||||
|
|
|
|||
|
|
@ -520,20 +520,6 @@
|
|||
<!-- Admin Tasks Page -->
|
||||
<section class="page" id="page-admin-tasks">
|
||||
<div class="admin-tasks-layout">
|
||||
<!-- Task Categories Section -->
|
||||
<div class="card">
|
||||
<div class="card-header" style="display:flex;justify-content:space-between;align-items:center;">
|
||||
<h3>Task Categories</h3>
|
||||
<button class="btn btn-sm btn-primary" onclick="Portal.showAddCategoryModal('task')">+ Add Category</button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p style="color:#666;margin-bottom:16px;">Categories organize tasks and assign colors. Every task needs a category.</p>
|
||||
<div class="categories-grid" id="taskCategoriesGrid">
|
||||
<div class="empty-state">Loading...</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick Tasks Section -->
|
||||
<div class="card">
|
||||
<div class="card-header" style="display:flex;justify-content:space-between;align-items:center;">
|
||||
|
|
|
|||
Reference in a new issue