@nuxt-customer-portal/timesheets 0.6.0 → 0.7.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @nuxt-customer-portal/timesheets
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @nuxt-customer-portal/clients@0.7.0
8
+ - @nuxt-customer-portal/core@0.7.0
9
+ - @nuxt-customer-portal/organizations@0.7.0
10
+ - @nuxt-customer-portal/ui@0.7.0
11
+
12
+ ## 0.6.1
13
+
14
+ ### Patch Changes
15
+
16
+ - 41e297d: Add reusable Harvest export and one-time migration commands with read-only previews, explicit member/client mappings, invoice and payment reconciliation, atomic imports, and duplicate protection.
17
+
18
+ Preserve distinct disabled historical users, credit and written-off invoices, original invoice lifecycle events and source metadata. Track externally billed time independently of invoice links to prevent edits and rebilling. Disambiguate duplicate project names and consolidate duplicate contact email records with explicit provenance. Apply the Timesheets and Invoices history migrations before importing.
19
+ - @nuxt-customer-portal/clients@0.6.1
20
+ - @nuxt-customer-portal/core@0.6.1
21
+ - @nuxt-customer-portal/organizations@0.6.1
22
+ - @nuxt-customer-portal/ui@0.6.1
23
+
3
24
  ## 0.6.0
4
25
 
5
26
  ### Minor Changes
@@ -0,0 +1,2 @@
1
+ ALTER TABLE timesheets.time_entry ADD COLUMN externally_billed boolean NOT NULL DEFAULT false;
2
+ ALTER TABLE timesheets.time_entry ADD COLUMN import_metadata jsonb;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt-customer-portal/timesheets",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://nuxt-customer-portal.com",
6
6
  "repository": {
@@ -45,10 +45,10 @@
45
45
  "pg": "^8.22.0",
46
46
  "resend": "^6.18.1",
47
47
  "zod": "^4.4.3",
48
- "@nuxt-customer-portal/core": "^0.6.0",
49
- "@nuxt-customer-portal/organizations": "^0.6.0",
50
- "@nuxt-customer-portal/clients": "^0.6.0",
51
- "@nuxt-customer-portal/ui": "^0.6.0"
48
+ "@nuxt-customer-portal/core": "^0.7.0",
49
+ "@nuxt-customer-portal/organizations": "^0.7.0",
50
+ "@nuxt-customer-portal/clients": "^0.7.0",
51
+ "@nuxt-customer-portal/ui": "^0.7.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "nuxt": "^4.5.1",
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  id: 'timesheets',
3
- version: '0.6.0',
3
+ version: '0.7.0',
4
4
  source: '@nuxt-customer-portal/timesheets',
5
5
  clientModuleId: 'timesheets',
6
6
  dependsOn: ['core', 'ui', 'organizations', 'clients'],
@@ -304,6 +304,8 @@ export const timeEntry = timesheetsSchema.table(
304
304
  entryDate: date('entry_date', { mode: 'string' }).notNull(),
305
305
  durationMinutes: integer('duration_minutes').default(0).notNull(),
306
306
  note: text('note'),
307
+ externallyBilled: boolean('externally_billed').default(false).notNull(),
308
+ importMetadata: jsonb('import_metadata').$type<Record<string, unknown>>(),
307
309
  billableSnapshot: boolean('billable_snapshot').notNull(),
308
310
  hourlyRateMinorSnapshot: integer('hourly_rate_minor_snapshot').notNull(),
309
311
  currencySnapshot: text('currency_snapshot').notNull(),
@@ -69,6 +69,7 @@ const toEntryDto = (row: TimeEntryRecord, submissionStatus: TimeEntryDto['submis
69
69
  entryDate: row.entryDate,
70
70
  durationMinutes: row.durationMinutes,
71
71
  note: row.note,
72
+ externallyBilled: row.externallyBilled,
72
73
  billable: row.billableSnapshot,
73
74
  hourlyRateMinor: row.hourlyRateMinorSnapshot,
74
75
  currency: row.currencySnapshot,
@@ -1708,6 +1709,9 @@ const withEditableDates = async <T>(
1708
1709
  })
1709
1710
 
1710
1711
  const requireEditableEntry = async (entry: TimeEntryRecord) => {
1712
+ if (entry.externallyBilled) {
1713
+ throw createError({ statusCode: 409, message: 'Historically billed time cannot be changed' })
1714
+ }
1711
1715
  if (!entry.submissionId) {
1712
1716
  return
1713
1717
  }
@@ -195,6 +195,7 @@ export interface ProjectDto {
195
195
  }
196
196
 
197
197
  export interface TimeEntryDto {
198
+ externallyBilled?: boolean
198
199
  id: string
199
200
  projectId: string
200
201
  activityTypeId: string