implemented bill deletion + var rename

This commit is contained in:
2024-01-05 13:54:25 +01:00
parent 4ffe2de6ea
commit 86135199a9
12 changed files with 122 additions and 117 deletions

View File

@@ -8,42 +8,20 @@ export interface BillAttachment {
fileContentsBase64: string;
};
/** Bill basic data */
export interface LocationBase {
/** bill object in the form returned by MongoDB */
export interface BillingLocation {
_id: string;
name: string;
/** the value is encoded as yyyymm (i.e. 202301) */
yearMonth: number;
bills: Bill[];
};
/** bill object in the form returned by MongoDB */
export interface MongoLocation {
_id: ObjectId;
bills: MongoBill[];
};
/** plain-object Location version */
export interface PlainLocation {
id: string;
bills: PlainBill[];
};
/** Bill basic data */
export interface BillBase {
export interface Bill {
_id: string;
name: string;
paid: boolean;
attachment?: BillAttachment|null;
notes?: string|null;
};
/** bill object in the form returned by MongoDB */
export interface MongoBill extends BillBase {
_id: ObjectId;
};
/** plain-object bill version */
export interface PlainBill extends BillBase {
id: string;
};
};