feat: journal UX overhaul — picker, export dialog, events, readability
- Sidebar i18n: added missing nav.journal to backend ru.json - Export: SaveWorklogReport binding with native SaveFileDialog + os.WriteFile - Filter: better IncludeChildren label with disabled tooltip - Filter: renamed billable→К оплате, approximate→Тип времени with hints - worklog_entry_events table (migration 013) linking entries to activity events - Suggestion: EventIDs + Events details, expandable cards with timestamps - Journal rows: expandable with details, source, linked events - Contrast: improved readability for dates, timestamps, hover states - i18n: added worklog.*, journal.*, suggest.* keys to ru.js/en.js
This commit is contained in:
@@ -7,16 +7,29 @@ const (
|
||||
ConfidenceHigh = "high"
|
||||
)
|
||||
|
||||
// SuggestionDetail is a lightweight event summary for suggestion display.
|
||||
type SuggestionDetail struct {
|
||||
ID string `json:"id"`
|
||||
EventType string `json:"eventType"`
|
||||
TargetType string `json:"targetType"`
|
||||
TargetID string `json:"targetId"`
|
||||
Title string `json:"title"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
NodeID string `json:"nodeId"`
|
||||
}
|
||||
|
||||
// Suggestion represents a suggested worklog entry derived from today's activity.
|
||||
type Suggestion struct {
|
||||
NodeID string `json:"nodeId"`
|
||||
NodeTitle string `json:"nodeTitle"`
|
||||
Summary string `json:"summary"`
|
||||
SuggestedMin int `json:"suggestedMin"`
|
||||
EventCount int `json:"eventCount"`
|
||||
NodeKind string `json:"nodeKind"`
|
||||
Confidence string `json:"confidence"`
|
||||
ConfidenceReason string `json:"confidenceReason"`
|
||||
Hidden bool `json:"hidden"`
|
||||
TimeSpreadMin int `json:"timeSpreadMin"` // minutes between first and last event
|
||||
NodeID string `json:"nodeId"`
|
||||
NodeTitle string `json:"nodeTitle"`
|
||||
Summary string `json:"summary"`
|
||||
SuggestedMin int `json:"suggestedMin"`
|
||||
EventCount int `json:"eventCount"`
|
||||
NodeKind string `json:"nodeKind"`
|
||||
Confidence string `json:"confidence"`
|
||||
ConfidenceReason string `json:"confidenceReason"`
|
||||
Hidden bool `json:"hidden"`
|
||||
TimeSpreadMin int `json:"timeSpreadMin"` // minutes between first and last event
|
||||
EventIDs []string `json:"eventIds"`
|
||||
Events []SuggestionDetail `json:"events,omitempty"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package storage
|
||||
|
||||
// migration013 — worklog_entry_events table linking entries to activity events.
|
||||
const migration013 = `
|
||||
CREATE TABLE IF NOT EXISTS worklog_entry_events (
|
||||
entry_id TEXT NOT NULL REFERENCES worklog_entries(id) ON DELETE CASCADE,
|
||||
event_id TEXT NOT NULL,
|
||||
PRIMARY KEY (entry_id, event_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_wle_events ON worklog_entry_events(event_id);
|
||||
`
|
||||
@@ -69,6 +69,7 @@ var migrationFiles = map[int]string{
|
||||
10: migration010,
|
||||
11: migration011,
|
||||
12: migration012,
|
||||
13: migration013,
|
||||
}
|
||||
|
||||
func (db *DB) runInitialSchema() error {
|
||||
|
||||
Reference in New Issue
Block a user