project map script | semantic parcer

This commit is contained in:
2026-01-01 16:58:21 +03:00
parent a747a163c8
commit 4c6fc8256d
84 changed files with 10178 additions and 537 deletions

View File

@@ -15,6 +15,8 @@
const dispatch = createEventDispatcher();
// [DEF:getStatusColor:Function]
// @PURPOSE: Returns the CSS color class for a given task status.
function getStatusColor(status: string) {
switch (status) {
case 'SUCCESS': return 'bg-green-100 text-green-800';
@@ -26,7 +28,10 @@
default: return 'bg-gray-100 text-gray-800';
}
}
// [/DEF:getStatusColor:Function]
// [DEF:formatTime:Function]
// @PURPOSE: Formats a date string using date-fns.
function formatTime(dateStr: string | null) {
if (!dateStr) return 'N/A';
try {
@@ -35,10 +40,14 @@
return 'Invalid date';
}
}
// [/DEF:formatTime:Function]
// [DEF:handleTaskClick:Function]
// @PURPOSE: Dispatches a select event when a task is clicked.
function handleTaskClick(taskId: string) {
dispatch('select', { id: taskId });
}
// [/DEF:handleTaskClick:Function]
</script>
<div class="bg-white shadow overflow-hidden sm:rounded-md">
@@ -91,4 +100,4 @@
{/if}
</div>
<!-- [/DEF:TaskList] -->
<!-- [/DEF:TaskList:Component] -->