Add LineItem CSV import and fix Unit API

This commit is contained in:
2025-12-08 13:20:52 +01:00
parent ee6525b549
commit 7ddf1337c1
12 changed files with 437 additions and 59 deletions
+7 -5
View File
@@ -294,7 +294,8 @@ export interface LineItem {
title: string,
description: string,
quantity: number,
unit: string,
unitId: number,
unit: Unit,
price: number,
}
@@ -310,7 +311,8 @@ export function newLineItem(isSection: boolean): LineItem {
title: '',
description: '',
quantity: 0,
unit: 'Stunden',
unitId: 2,
unit: newUnit(),
price: 93.75,
}
}
@@ -361,9 +363,9 @@ export interface Unit {
export function newUnit(): Unit {
return {
id: 0,
name: '',
symbol: null,
id: 2,
name: 'Stunden',
symbol: 'h',
createdAt: new Date(),
updatedAt: new Date()
}