feat: Add is_system column to notes and update task note handling for system notes
This commit is contained in:
@@ -516,9 +516,7 @@ export default function ProjectTasksSection({ projectId }) {
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
|
||||
{/* Notes row (expandable) */}
|
||||
)} {/* Notes row (expandable) */}
|
||||
{expandedNotes[task.id] && (
|
||||
<tr className="bg-gray-50">
|
||||
<td colSpan="6" className="px-4 py-4">
|
||||
@@ -534,9 +532,20 @@ export default function ProjectTasksSection({ projectId }) {
|
||||
{taskNotes[task.id].map((note) => (
|
||||
<div
|
||||
key={note.note_id}
|
||||
className="bg-white p-3 rounded border flex justify-between items-start"
|
||||
className={`p-3 rounded border flex justify-between items-start ${
|
||||
note.is_system
|
||||
? 'bg-blue-50 border-blue-200'
|
||||
: 'bg-white border-gray-200'
|
||||
}`}
|
||||
>
|
||||
<div className="flex-1">
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
{note.is_system && (
|
||||
<span className="px-2 py-1 text-xs bg-blue-100 text-blue-700 rounded-full font-medium">
|
||||
System
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-sm text-gray-800">
|
||||
{note.note}
|
||||
</p>
|
||||
@@ -550,18 +559,20 @@ export default function ProjectTasksSection({ projectId }) {
|
||||
).toLocaleTimeString()}
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={() =>
|
||||
handleDeleteNote(
|
||||
note.note_id,
|
||||
task.id
|
||||
)
|
||||
}
|
||||
className="ml-2 text-red-500 hover:text-red-700 text-xs font-bold"
|
||||
title="Delete note"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
{!note.is_system && (
|
||||
<button
|
||||
onClick={() =>
|
||||
handleDeleteNote(
|
||||
note.note_id,
|
||||
task.id
|
||||
)
|
||||
}
|
||||
className="ml-2 text-red-500 hover:text-red-700 text-xs font-bold"
|
||||
title="Delete note"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user