clocktopus 1.6.14 → 1.6.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/clockify.js CHANGED
@@ -118,13 +118,13 @@ export class Clockify {
118
118
  }
119
119
  }
120
120
  const startedAt = new Date().toISOString();
121
- const sessionId = uuidv4();
122
121
  const response = await this.httpClient.post(`/workspaces/${workspaceId}/time-entries`, {
123
122
  projectId: projectId,
124
123
  description: finalDescription,
125
124
  start: startedAt,
126
125
  billable,
127
126
  });
127
+ const sessionId = response.data.id ?? uuidv4();
128
128
  // Log session to SQLite
129
129
  logSessionStart(sessionId, projectId, finalDescription, startedAt, jiraTicket);
130
130
  const project = await this.getProjectById(workspaceId, projectId);
@@ -883,8 +883,13 @@ export function indexPage() {
883
883
  duration = '<span class="in-progress">In progress</span>';
884
884
  }
885
885
  const jira = s.jiraTicket || '-';
886
+ const canDelete = !!s.completedAt && !!s.jiraWorklogId;
887
+ const disabledAttr = canDelete ? '' : ' disabled';
888
+ const btnTitle = canDelete
889
+ ? 'Delete entry'
890
+ : 'Cannot delete: no tracked Jira worklog id';
886
891
  const deleteBtn = s.completedAt
887
- ? '<button class="delete-btn" title="Delete entry" data-delete-id="' + escapeHtml(s.id) + '">&times;</button>'
892
+ ? '<button class="delete-btn" title="' + btnTitle + '" data-delete-id="' + escapeHtml(s.id) + '"' + disabledAttr + '>&times;</button>'
888
893
  : '';
889
894
  return '<tr>' +
890
895
  '<td>' + escapeHtml(s.description) + '</td>' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clocktopus",
3
- "version": "1.6.14",
3
+ "version": "1.6.17",
4
4
  "description": "Time-tracking automation for Clockify with idle monitoring, Jira integration, Google Calendar sync, CLI, web dashboard, and desktop app.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",