|
118 | 118 | </td> |
119 | 119 | <td class="px-6 py-4"> |
120 | 120 | <div class="flex items-center gap-2"> |
121 | | - <svelte:component |
122 | | - this={getStatusIcon(task.status)} |
123 | | - size={16} |
124 | | - class={ |
125 | | - task.status === 'Completed' ? 'text-green-500 dark:text-green-400' : |
126 | | - task.status === 'In Progress' ? 'text-yellow-500 dark:text-yellow-400' : |
127 | | - task.status === 'Not Started' ? 'text-gray-400 dark:text-gray-500' : |
128 | | - task.status === 'Waiting on someone else' ? 'text-purple-500 dark:text-purple-400' : |
129 | | - task.status === 'Deferred' ? 'text-pink-500 dark:text-pink-400' : 'text-gray-400 dark:text-gray-500' |
130 | | - } |
131 | | - /> |
| 121 | + {#snippet statusIcon(status)} |
| 122 | + {@const StatusIcon = getStatusIcon(status)} |
| 123 | + <StatusIcon |
| 124 | + size={16} |
| 125 | + class={ |
| 126 | + status === 'Completed' ? 'text-green-500 dark:text-green-400' : |
| 127 | + status === 'In Progress' ? 'text-yellow-500 dark:text-yellow-400' : |
| 128 | + status === 'Not Started' ? 'text-gray-400 dark:text-gray-500' : |
| 129 | + status === 'Waiting on someone else' ? 'text-purple-500 dark:text-purple-400' : |
| 130 | + status === 'Deferred' ? 'text-pink-500 dark:text-pink-400' : 'text-gray-400 dark:text-gray-500' |
| 131 | + } |
| 132 | + /> |
| 133 | + {/snippet} |
| 134 | + {@render statusIcon(task.status)} |
132 | 135 | <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium |
133 | 136 | {task.status === 'Completed' ? 'bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300' : ''} |
134 | 137 | {task.status === 'In Progress' ? 'bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-300' : ''} |
|
142 | 145 | </td> |
143 | 146 | <td class="px-6 py-4"> |
144 | 147 | <div class="flex items-center gap-2"> |
145 | | - <svelte:component |
146 | | - this={getPriorityIcon(task.priority)} |
147 | | - size={16} |
148 | | - class={ |
149 | | - task.priority === 'High' ? 'text-red-500 dark:text-red-400' : |
150 | | - task.priority === 'Normal' ? 'text-blue-500 dark:text-blue-400' : |
151 | | - task.priority === 'Low' ? 'text-gray-400 dark:text-gray-500' : 'text-gray-400 dark:text-gray-500' |
152 | | - } |
153 | | - /> |
| 148 | + {#snippet priorityIcon(priority)} |
| 149 | + {@const PriorityIcon = getPriorityIcon(priority)} |
| 150 | + <PriorityIcon |
| 151 | + size={16} |
| 152 | + class={ |
| 153 | + priority === 'High' ? 'text-red-500 dark:text-red-400' : |
| 154 | + priority === 'Normal' ? 'text-blue-500 dark:text-blue-400' : |
| 155 | + priority === 'Low' ? 'text-gray-400 dark:text-gray-500' : 'text-gray-400 dark:text-gray-500' |
| 156 | + } |
| 157 | + /> |
| 158 | + {/snippet} |
| 159 | + {@render priorityIcon(task.priority)} |
154 | 160 | <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium |
155 | 161 | {task.priority === 'High' ? 'bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-300' : ''} |
156 | 162 | {task.priority === 'Normal' ? 'bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-300' : ''} |
|
235 | 241 |
|
236 | 242 | <div class="flex flex-wrap gap-2 mb-3"> |
237 | 243 | <div class="flex items-center gap-1"> |
238 | | - <svelte:component |
239 | | - this={getStatusIcon(task.status)} |
240 | | - size={14} |
241 | | - class={ |
242 | | - task.status === 'Completed' ? 'text-green-500 dark:text-green-400' : |
243 | | - task.status === 'In Progress' ? 'text-yellow-500 dark:text-yellow-400' : |
244 | | - task.status === 'Not Started' ? 'text-gray-400 dark:text-gray-500' : |
245 | | - task.status === 'Waiting on someone else' ? 'text-purple-500 dark:text-purple-400' : |
246 | | - task.status === 'Deferred' ? 'text-pink-500 dark:text-pink-400' : 'text-gray-400 dark:text-gray-500' |
247 | | - } |
248 | | - /> |
| 244 | + {#snippet statusIconCard(status)} |
| 245 | + {@const StatusIcon = getStatusIcon(status)} |
| 246 | + <StatusIcon |
| 247 | + size={14} |
| 248 | + class={ |
| 249 | + status === 'Completed' ? 'text-green-500 dark:text-green-400' : |
| 250 | + status === 'In Progress' ? 'text-yellow-500 dark:text-yellow-400' : |
| 251 | + status === 'Not Started' ? 'text-gray-400 dark:text-gray-500' : |
| 252 | + status === 'Waiting on someone else' ? 'text-purple-500 dark:text-purple-400' : |
| 253 | + status === 'Deferred' ? 'text-pink-500 dark:text-pink-400' : 'text-gray-400 dark:text-gray-500' |
| 254 | + } |
| 255 | + /> |
| 256 | + {/snippet} |
| 257 | + {@render statusIconCard(task.status)} |
249 | 258 | <span class="text-xs px-2 py-1 rounded-full font-medium |
250 | 259 | {task.status === 'Completed' ? 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300' : ''} |
251 | 260 | {task.status === 'In Progress' ? 'bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300' : ''} |
|
258 | 267 | </div> |
259 | 268 |
|
260 | 269 | <div class="flex items-center gap-1"> |
261 | | - <svelte:component |
262 | | - this={getPriorityIcon(task.priority)} |
263 | | - size={14} |
264 | | - class={ |
265 | | - task.priority === 'High' ? 'text-red-500 dark:text-red-400' : |
266 | | - task.priority === 'Normal' ? 'text-blue-500 dark:text-blue-400' : |
267 | | - task.priority === 'Low' ? 'text-gray-400 dark:text-gray-500' : 'text-gray-400 dark:text-gray-500' |
268 | | - } |
269 | | - /> |
| 270 | + {#snippet priorityIconCard(priority)} |
| 271 | + {@const PriorityIcon = getPriorityIcon(priority)} |
| 272 | + <PriorityIcon |
| 273 | + size={14} |
| 274 | + class={ |
| 275 | + priority === 'High' ? 'text-red-500 dark:text-red-400' : |
| 276 | + priority === 'Normal' ? 'text-blue-500 dark:text-blue-400' : |
| 277 | + priority === 'Low' ? 'text-gray-400 dark:text-gray-500' : 'text-gray-400 dark:text-gray-500' |
| 278 | + } |
| 279 | + /> |
| 280 | + {/snippet} |
| 281 | + {@render priorityIconCard(task.priority)} |
270 | 282 | <span class="text-xs px-2 py-1 rounded-full font-medium |
271 | 283 | {task.priority === 'High' ? 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300' : ''} |
272 | 284 | {task.priority === 'Normal' ? 'bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300' : ''} |
|
0 commit comments