Photo lightbox, timeline photo previews, subtle edit/delete footer
- Photos open in a full-screen lightbox overlay instead of navigating to a new tab (fixes PWA back-button issue) - DB migration adds photo_id to task_events; photo upload logs the reference so activity timeline can show a clickable thumbnail for each 'Photo added' event - Edit and Delete buttons moved to a quiet ghost-button footer at the bottom-right of the modal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4ab9eb4035
commit
5d62050745
6 changed files with 94 additions and 27 deletions
|
|
@ -15,11 +15,11 @@ export const TRANSITIONS = {
|
|||
fixed: ['submitted'], // reopen only
|
||||
}
|
||||
|
||||
export async function logEvent(taskId, eventType, { fromStatus = null, toStatus = null, note = null, userName = null } = {}) {
|
||||
export async function logEvent(taskId, eventType, { fromStatus = null, toStatus = null, note = null, userName = null, photoId = null } = {}) {
|
||||
await pool.query(
|
||||
`INSERT INTO task_events (task_id, event_type, from_status, to_status, note, user_name)
|
||||
VALUES ($1, $2, $3, $4, $5, $6)`,
|
||||
[taskId, eventType, fromStatus, toStatus, note, userName]
|
||||
`INSERT INTO task_events (task_id, event_type, from_status, to_status, note, user_name, photo_id)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7)`,
|
||||
[taskId, eventType, fromStatus, toStatus, note, userName, photoId]
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue