Add Day Started event to activity log with template name
- On session start, insert a session_start TimerEvent so the action appears in the activity log timeline - Load DailySession.template via selectinload in the timeline query so the template name is available without extra round-trips - _to_timeline_out maps the template name into block_label for session_start events, displaying as "Day started — Template Name" - Add session_start to EVENT_META on the frontend (🏫 icon) - Hide the Edit button for session_start entries since changing their event type to a block-level action doesn't make sense Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-actions">
|
||||
<button class="btn-sm" @click="startEdit(entry)">Edit</button>
|
||||
<button class="btn-sm" v-if="entry.event_type !== 'session_start'" @click="startEdit(entry)">Edit</button>
|
||||
<button class="btn-sm btn-danger" @click="deleteEntry(entry)">✕</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -183,11 +183,12 @@ function fmtTime(isoStr) {
|
||||
}
|
||||
|
||||
const EVENT_META = {
|
||||
start: { icon: '▶', label: 'Started' },
|
||||
pause: { icon: '⏸', label: 'Paused' },
|
||||
resume: { icon: '↺', label: 'Resumed' },
|
||||
complete: { icon: '✓', label: 'Completed' },
|
||||
skip: { icon: '⟶', label: 'Skipped' },
|
||||
session_start: { icon: '🏫', label: 'Day started' },
|
||||
start: { icon: '▶', label: 'Started' },
|
||||
pause: { icon: '⏸', label: 'Paused' },
|
||||
resume: { icon: '↺', label: 'Resumed' },
|
||||
complete: { icon: '✓', label: 'Completed' },
|
||||
skip: { icon: '⟶', label: 'Skipped' },
|
||||
}
|
||||
|
||||
function eventIcon(entry) {
|
||||
|
||||
Reference in New Issue
Block a user